© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•3mo ago•
2 replies
zacoons

✅ C# 14 extension indexers?

There are extension properties and extension statics, but is it possible to write extension indexers?
I've tried the following, but it says "
this
this
member is not allowed in an extension block".
extension(DataGridViewRow row)
{
    public DataGridViewCell this[int i] => row.Cells[i];
}
extension(DataGridViewRow row)
{
    public DataGridViewCell this[int i] => row.Cells[i];
}
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

visual studio code C# extension
C#CC# / help
2mo ago
❔ C# extension is still Brokey
C#CC# / help
3y ago
❔ ninja script which is a c# extension
C#CC# / help
3y ago
Do C# dev kit extension requires internet connection to work?
C#CC# / help
15mo ago