Skip to content

Conversation

Copilot
Copy link
Contributor

@Copilot Copilot AI commented Sep 8, 2025

This PR addresses user feedback requesting more complex examples in the Visual Basic Property Statement documentation, specifically asking for parameterized property examples and better guidance to advanced scenarios.

Changes Made

Added Parameterized Property Example

  • Created a new code snippet (Snippet52) demonstrating a practical parameterized property that acts as an indexer
  • Shows a SampleCollection class with a Default property that accepts an Integer parameter
  • Includes proper error handling, bounds checking, and the ability to add new items
  • Demonstrates both Get and Set accessors in a real-world scenario

Enhanced Documentation Navigation

  • Added inline links in the Remarks section pointing to mixed access levels documentation
  • Enhanced parameter descriptions for Default and parameterlist with contextual links to comprehensive examples
  • Added guidance paragraph directing readers to Property Procedures for additional examples

Improved "See Also" Section

  • Reorganized links into logical categories: "Property Types and Features", "Advanced Property Scenarios", and "Related Statements and Concepts"
  • Maintained all existing links while improving discoverability
  • Added proper markdown formatting with required blank lines

Technical Details

The new parameterized property example shows:

Default Public Property Item(ByVal index As Integer) As String
    Get
        ' Return the item at the specified index with bounds checking
    End Get
    Set(ByVal value As String)
        ' Set the item with support for adding new items
    End Set
End Property

All changes pass markdown linting validation and the code compiles successfully without introducing new warnings.

This approach balances providing the requested examples while following maintainer guidance to use links to existing comprehensive resources rather than duplicating content in reference documentation.

Fixes #27870.


💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.


Internal previews

📄 File 🔗 Preview link
docs/visual-basic/language-reference/statements/property-statement.md docs/visual-basic/language-reference/statements/property-statement

@dotnet-policy-service dotnet-policy-service bot added the okr-quality Content-quality KR: Concerns article defects (bugs), freshness, or build warnings. label Sep 8, 2025
Co-authored-by: BillWagner <493969+BillWagner@users.noreply.github.com>
@Copilot Copilot AI changed the title [WIP] Needs more examples Add parameterized property example and improve navigation in Property Statement docs Sep 8, 2025
@Copilot Copilot AI requested a review from BillWagner September 8, 2025 19:08
Copilot finished work on behalf of BillWagner September 8, 2025 19:08
Copy link
Member

@BillWagner BillWagner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is ready for final review

@BillWagner BillWagner marked this pull request as ready for review September 9, 2025 15:12
@BillWagner BillWagner requested a review from a team as a code owner September 9, 2025 15:12
@BillWagner BillWagner requested a review from gewarren September 9, 2025 15:12
Copy link
Contributor

@meaghanlewis meaghanlewis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These changes LGTM.

Q: Is the convention in this content area to use title case for the headers instead of sentence case? It seems like the norm but deviates from the style guide recommendation.

@BillWagner
Copy link
Member

@meaghanlewis

Q: Is the convention in this content area to use title case for the headers instead of sentence case? It seems like the norm but deviates from the style guide recommendation.

That's historical. When MSDN content was imported, title case was part of it. When we make a full freshness pass, we update the article to sentence case. The main goal is to be consistent in each article.

@BillWagner BillWagner merged commit 3405fbe into main Sep 9, 2025
13 checks passed
@BillWagner BillWagner deleted the copilot/fix-27870 branch September 9, 2025 18:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dotnet-visualbasic/svc okr-quality Content-quality KR: Concerns article defects (bugs), freshness, or build warnings.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Needs more examples
3 participants