Skip to content

Fix incorrect comment label in partial property snippet#53652

Open
Copilot wants to merge 2 commits intomainfrom
copilot/fix-docs-comment-bug
Open

Fix incorrect comment label in partial property snippet#53652
Copilot wants to merge 2 commits intomainfrom
copilot/fix-docs-comment-bug

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 6, 2026

The FieldProperty code snippet had duplicate // Defining declaration comments, where the second occurrence should have been // Implementing declaration.

  • Program.cs (line 182): Changed // Defining declaration// Implementing declaration on the class containing the property implementation (get => field; set;)
// in file1.cs
public partial class PropertyBag
{
    // Defining declaration        ✅ unchanged
    public partial int MyProperty { get; set; }
}

// In file2.cs
public partial class PropertyBag
{
    // Implementing declaration    ✅ was "Defining declaration"
    public partial int MyProperty { get => field; set; }
}

Labels now match the article's terminology ("defining and implementing member declaration").

Copilot AI self-assigned this May 6, 2026
Copilot AI review requested due to automatic review settings May 6, 2026 12:35
Copilot AI review requested due to automatic review settings May 6, 2026 12:35
Copilot AI linked an issue May 6, 2026 that may be closed by this pull request
…ng declaration

Agent-Logs-Url: https://github.com/dotnet/docs/sessions/41c6c349-354f-4a06-8391-a7522dfa30a4

Co-authored-by: BillWagner <493969+BillWagner@users.noreply.github.com>
Copilot AI requested review from Copilot and removed request for Copilot May 6, 2026 12:37
Copilot AI changed the title [WIP] Fix comment for implementing declaration in property bag example Fix incorrect comment label in partial property snippet May 6, 2026
Copilot AI requested a review from BillWagner May 6, 2026 12:38
Copy link
Copy Markdown
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 LGTM and is ready for final review.

@BillWagner BillWagner marked this pull request as ready for review May 6, 2026 18:05
@BillWagner BillWagner requested a review from a team as a code owner May 6, 2026 18:05
Copilot AI review requested due to automatic review settings May 6, 2026 18:05
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes a mislabeled comment in the C# “partial property” (<FieldProperty>) snippet so that the two partial declarations are correctly described as defining vs implementing declarations, aligning the snippet’s terminology with the associated article.

Changes:

  • Updated the comment in the second partial PropertyBag declaration from // Defining declaration to // Implementing declaration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug in docs?

4 participants