[Proposal]: extension indexers
# Extension indexers
* Specification:
* Discussion: https://github.com/dotnet/csharplang/discussions/9855
## Summary
We add the ability to declare extension indexers.
```csharp
static class E
{
extension(...)
{
int this[int i]
{
get { ... }
set { ... }
}
}
}
```
There are also some other extension improvements we should consider (see [cut list](https://github.com/dotnet/roslyn/issues/76130) 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
0 条评论