Skip to content

Address comments#52878

Merged
BillWagner merged 5 commits intodotnet:mainfrom
BillWagner:fast-follow
Apr 7, 2026
Merged

Address comments#52878
BillWagner merged 5 commits intodotnet:mainfrom
BillWagner:fast-follow

Conversation

@BillWagner
Copy link
Copy Markdown
Member

@BillWagner BillWagner commented Apr 6, 2026

#52685 was merged while a review wasn't yet completed. Address those comments.


Internal previews

📄 File 🔗 Preview link
docs/csharp/fundamentals/types/classes.md C# classes
docs/csharp/fundamentals/types/records.md "C# record types"
docs/csharp/fundamentals/types/structs.md C# structs

dotnet#52685 was merged while a review wasn't yet completed. Address those comments.
@BillWagner BillWagner requested a review from a team as a code owner April 6, 2026 19:11
Copilot AI review requested due to automatic review settings April 6, 2026 19:11
@dotnetrepoman dotnetrepoman bot added this to the April 2026 milestone Apr 6, 2026
@BillWagner BillWagner requested a review from adegeo April 6, 2026 19:11
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 follows up on review feedback from #52685 by reorganizing and tightening the C# type documentation (classes, structs, and records), and adjusting related snippet files to match the revised narrative.

Changes:

  • Moves “When to use …” guidance earlier in the structs and records articles, and adds brief lead-in sentences around snippet callouts.
  • Simplifies the classes article by removing the standalone “Collection initializers” section and replacing it with a shorter reference.
  • Tweaks/cleans up record-related snippet comments and adds a clarifying comment in the equality snippet.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
docs/csharp/fundamentals/types/structs.md Moves “When to use structs” earlier and adds snippet lead-in text.
docs/csharp/fundamentals/types/records.md Moves “When to use records” earlier and adds record-struct clarifications and lead-ins.
docs/csharp/fundamentals/types/classes.md Adds “When to use classes,” revises wording, and replaces the removed collection-initializers section with a brief reference (but introduces a couple issues).
docs/csharp/fundamentals/types/snippets/records/RecordStruct.cs Minor comment formatting change in the record class vs struct snippet.
docs/csharp/fundamentals/types/snippets/records/FirstRecord.cs Removes the “UsingRecord” snippet block (but now breaks compilation due to missing person).
docs/csharp/fundamentals/types/snippets/records/EqualityTest.cs Adds a clarifying comment describing the record properties.
docs/csharp/fundamentals/types/snippets/classes/Program.cs Removes the collection expressions demo snippet block.

Copy link
Copy Markdown
Contributor

@adegeo adegeo left a comment

Choose a reason for hiding this comment

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

LGTM! Approved with some small suggestions.

Co-authored-by: Andy (Steve) De George <[email protected]>
@BillWagner BillWagner enabled auto-merge (squash) April 7, 2026 15:14
@BillWagner BillWagner merged commit d264e05 into dotnet:main Apr 7, 2026
9 checks passed
@BillWagner BillWagner deleted the fast-follow branch April 7, 2026 15:19
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.

3 participants