dotnet / dotnet/csharplang

[Proposal]: extension indexers (VS 18.8, .NET 11)

Open
#9,856 0 comments 0 reactions 1 assignee View on GitHub

@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

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

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.