Skip to content

Add language reference for extension indexers#54716

Open
BillWagner wants to merge 3 commits into
dotnet:mainfrom
BillWagner:extension-indexers-reference
Open

Add language reference for extension indexers#54716
BillWagner wants to merge 3 commits into
dotnet:mainfrom
BillWagner:extension-indexers-reference

Conversation

@BillWagner

@BillWagner BillWagner commented Jul 8, 2026

Copy link
Copy Markdown
Member

Add the information for extension indexers into the language reference.
Copilot AI review requested due to automatic review settings July 8, 2026 20:08
@BillWagner BillWagner requested a review from a team as a code owner July 8, 2026 20:08
@dotnetrepoman dotnetrepoman Bot added this to the July 2026 milestone Jul 8, 2026
@BillWagner

Copy link
Copy Markdown
Member Author

Notes for reviewers: The extension indexers feature is included in .NET 11 preview 6. Our CI builds use .NET 11 preview 5 at the moment. Please do the first review so we can merge quickly once preview 6 is available.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds C# 15 “extension indexers” coverage to the C# language reference and supporting snippet projects, and surfaces the feature in the C# 15 “What’s new” page.

Changes:

  • Adds an “Extension indexers” section to the C# 15 overview page.
  • Extends the extension keyword reference to document extension indexer declarations and usage (with snippet integration).
  • Updates XML doc examples/snippets to include extension indexer XML documentation and enables LangVersion=preview for the xmldoc snippet project.

Reviewed changes

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

Show a summary per file
File Description
docs/csharp/whats-new/csharp-15.md Adds a new “Extension indexers” feature section and TOC entry for C# 15.
docs/csharp/language-reference/xmldoc/snippets/xmldoc/xmldoc.csproj Sets LangVersion to preview so the snippet project can compile with preview language features.
docs/csharp/language-reference/xmldoc/snippets/xmldoc/DocComments.cs Adds an extension indexer example member with XML documentation.
docs/csharp/language-reference/xmldoc/examples.md Documents cref syntax for extension indexers in the XML doc examples article.
docs/csharp/language-reference/keywords/snippets/Extensions.cs Adds extension indexer and usage snippets to support the language-reference article.
docs/csharp/language-reference/keywords/extension.md Adds “Extension indexers” section and updates introductory text to include indexers as valid extension members.

Comment thread docs/csharp/language-reference/keywords/snippets/Extensions.cs Outdated
Comment thread docs/csharp/language-reference/xmldoc/snippets/xmldoc/DocComments.cs Outdated
Comment thread docs/csharp/language-reference/xmldoc/examples.md Outdated
Comment thread docs/csharp/language-reference/xmldoc/examples.md Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Comment thread docs/csharp/language-reference/keywords/extension.md Outdated
Co-authored-by: Genevieve Warren <24882762+gewarren@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[C# 15-Fundamentals and reference]: Extension indexers

3 participants