Skip to content

Conversation

@BillWagner
Copy link
Member

@BillWagner BillWagner commented Dec 11, 2025

Fixes #49956

Add examples and explanations for writing documentation on extension nodes.

Include how the XML comments on the extension node for <summary>, <param> and <typeparam> are copied to all members of that extension block.


Internal previews

📄 File 🔗 Preview link
docs/csharp/language-reference/keywords/extension.md Extension declaration (C# Reference)
docs/csharp/language-reference/xmldoc/examples.md "Example XML documentation comments"

Fixes dotnet#49956

Add examples and explanations for writing documentation on `extension` nodes.

Include how the XML comments on the `extension` node for `<summary>`, `<param>` and `<typeparam>` are copied to all members of that extension block.
@BillWagner BillWagner requested a review from a team as a code owner December 11, 2025 19:39
Copilot AI review requested due to automatic review settings December 11, 2025 19:39
@dotnetrepoman dotnetrepoman bot added this to the December 2025 milestone Dec 11, 2025
Copy link
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 adds comprehensive XML documentation examples for C# extension members, demonstrating how to properly document extension blocks and their members. The changes update the target framework to .NET 10.0 and add documentation showing that XML comments on extension blocks are copied to all members within that block.

Key Changes

  • Added new "Extension members" section to XML documentation examples
  • Included XML comments for all extension examples showing proper documentation patterns
  • Updated target framework from net8.0 to net10.0
  • Applied markdown style improvements for consistency with .NET documentation guidelines

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
docs/csharp/language-reference/xmldoc/snippets/xmldoc/xmldoc.csproj Updated target framework to net10.0
docs/csharp/language-reference/xmldoc/snippets/xmldoc/DocComments.cs Added new extension example with XML comments demonstrating documentation for extension blocks and members
docs/csharp/language-reference/xmldoc/examples.md Added "Extension members" section explaining XML documentation for extension blocks, plus style improvements
docs/csharp/language-reference/keywords/snippets/Extensions.cs Added comprehensive XML comments to existing extension examples
docs/csharp/language-reference/keywords/extension.md Added note about XML documentation patterns and style improvements

@BillWagner BillWagner requested a review from gewarren December 11, 2025 20:00
@BillWagner BillWagner enabled auto-merge (squash) December 12, 2025 15:53
@BillWagner BillWagner merged commit 7c97d76 into dotnet:main Dec 12, 2025
9 checks passed
@BillWagner BillWagner deleted the xml-extension-docs branch December 12, 2025 15:56
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.

Add information on how to write XML comments for extensions

2 participants