Add language reference for extension indexers#54716
Open
BillWagner wants to merge 3 commits into
Open
Conversation
Add the information for extension indexers into the language reference.
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. |
Contributor
There was a problem hiding this comment.
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
extensionkeyword 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=previewfor 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. |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
gewarren
approved these changes
Jul 9, 2026
Co-authored-by: Genevieve Warren <24882762+gewarren@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add the information for extension indexers into the language reference.
Fixes #54656
Internal previews