[Proposal]: extension indexers (VS 18.8, .NET 11)
Open
@jcouv is already working on this.
Since Dec 1, 2025.
Implemented Needs ECMA Spec
Proposal champion
- Dominant language
- C#
- Stars
- 12.7k
- Forks
- 1.1k
- Avg merge
- 11h 1m
- Merged PRs (30d)
- 3
Description
Extension indexers
- Specification: https://github.com/dotnet/csharplang/blob/main/proposals/csharp-15.0/extension-indexers.md
- Discussion: https://github.com/dotnet/csharplang/discussions/9855
Summary
We add the ability to declare extension indexers.
static class E
{
extension(...)
{
int this[int i]
{
get { ... }
set { ... }
}
}
}
There are also some other extension improvements we should consider (see cut list from C# 14)
LDM Meetings
- The topic was discussed previously as part of the extension feature in C# 14: https://github.com/dotnet/csharplang/issues/8697
- https://github.com/dotnet/csharplang/blob/main/meetings/2026/LDM-2026-02-02.md#extension-indexers
- https://github.com/dotnet/csharplang/blob/main/meetings/2026/LDM-2026-03-09.md#extension-indexers
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.