<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/indexer-extension-members-in-c-15-yabwnagyx" -->

---
title: Indexer extension members in C# 15 | daily.dev
description: C# 15 introduces extension indexers, completing the extension members feature set that began in C# 14 with extension methods, properties, static members, and...
canonical: https://daily.dev/posts/indexer-extension-members-in-c-15-yabwnagyx
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Indexer extension members in C# 15 | daily.dev
og:description: C# 15 introduces extension indexers, completing the extension members feature set that began in C# 14 with extension methods, properties, static members, and...
og:url: https://daily.dev/posts/indexer-extension-members-in-c-15-yabwnagyx
og:image: https://api.daily.dev/og/posts/YabwnAGyx.png
og:image:alt: Indexer extension members in C# 15
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Indexer extension members in C# 15

**[Damir's Corner](https://daily.dev/sources/damirscorner)** · 4 min read · 17 upvotes · 2 comments

## Summary

C# 15 introduces extension indexers, completing the extension members feature set that began in C# 14 with extension methods, properties, static members, and operators. Extension indexers follow the same extension block syntax and are only used by the compiler when no matching real indexer exists; implicit Index/Range indexers take precedence, and extension indexers on arrays and strings are ignored entirely due to baseline language rules. The feature is currently in preview and requires setting LangVersion to preview in .NET 11 preview 7. A sample GitHub repository demonstrates all extension member types from both C# 14 and C# 15. Conversion operators remain the only member type without extension support, and are not currently planned.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://www.damirscorner.com/blog/posts/20260911-IndexerExtensionMembersInCs15.html>

## Questions this post answers

### How do I write an extension indexer in C# 15?

Declare it inside an extension block using the same syntax pattern as other extension members: extension(IEnumerable<int> sequence) { public int this[int index] => sequence.ElementAt(index); }. This is a preview feature in .NET 11 preview 7, requiring LangVersion set to preview in the project file. It completes the extension members feature started in C# 14.

_Track new C# language previews like this one on daily.dev as you plan adoption of extension indexers._

### Why don't extension indexers work on arrays or strings in C#?

The current specification and baseline rules for array access and string access mean extension indexers don't function on arrays or strings, even though declaring such extension indexers is technically permitted by the compiler. This limitation is documented in the collapsed open issues section of the extension indexers feature specification for C# 15.

_Developers adopting new C# 15 features can follow gotchas like this one on daily.dev before shipping code._

### Do extension indexers take precedence over implicit Index and Range indexers in C#?

No, implicit Index and Range indexers always take precedence over extension indexers with the same type in C# 15. For example, if a type has an int indexer plus a Length or Count property, the Index indexer is implicitly supported and any extension Index indexer is ignored even if explicitly implemented.

_Keep up with precedence rules in evolving C# indexer features by following language updates on daily.dev._

## Community discussion

Top comments from developers on daily.dev.

**@jenueldev** · 0 upvotes

> The precedence rules are the most important part here: real indexers and implicit Index/Range behavior win, so an extension cannot silently rewrite existing semantics. That makes extension indexers feel safer for domain-specific collection types, though the preview-only requirement is a good reminder to keep experiments isolated until the language design settles.

**@agustinbarrientos** · 0 upvotes

> Can the compiler warn when an extension indexer can never be chosen? I'd probably blame my own code before I thought about overload resolution. Even a plain warning on the declaration would help.

## Similar posts on daily.dev

- [Extension Properties: C\# 14’s Game-Changer for Cleaner Code](https://daily.dev/posts/extension-properties-c-14-s-game-changer-for-cleaner-code-aawdgf4pc) · Telerik · 0 upvotes · 0 comments
- [C\# Extension Members](https://daily.dev/posts/c-extension-members-1anekbztp) · JetBrains · 18 upvotes · 1 comments
- [The best new features of C\# 14](https://daily.dev/posts/the-best-new-features-of-c-14-6gsbbjwv4) · InfoWorld · 46 upvotes · 4 comments
- [Adding static getter thanks to extensions](https://daily.dev/posts/adding-static-getter-thanks-to-extensions-rvnhzsfwz) · We Are .NET · 0 upvotes · 0 comments

---

Tags: [#.net](https://daily.dev/tags/.net), [#c#](https://daily.dev/tags/c#)

[View this post on daily.dev](https://daily.dev/posts/indexer-extension-members-in-c-15-yabwnagyx)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Indexer extension members in C# 15","url":"https://daily.dev/posts/indexer-extension-members-in-c-15-yabwnagyx","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/indexer-extension-members-in-c-15-yabwnagyx"},"datePublished":"2026-09-11T06:26:19.809Z","dateModified":"2026-10-15T02:22:25.536Z","description":"C# 15 introduces extension indexers, completing the extension members feature set that began in C# 14 with extension methods, properties, static members, and...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/425073b57495acf9675afac1769c56ee?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/425073b57495acf9675afac1769c56ee?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Damir's Corner","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Damir's Corner","logo":"https://media.daily.dev/image/upload/s--9Wkl5ofQ--/f_auto,q_auto/v1780213496/logos/damirscorner?_a=BAMAMiWQ0","url":"https://daily.dev/sources/damirscorner"},"commentCount":2,"discussionUrl":"https://daily.dev/posts/indexer-extension-members-in-c-15-yabwnagyx","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":17},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":2}],"keywords":".net,c#","timeRequired":"PT4M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Damir's Corner","item":"https://daily.dev/sources/damirscorner"},{"@type":"ListItem","position":3,"name":"Indexer extension members in C# 15"}]}
{"@context":"https://schema.org","@type":"WebPage","@id":"https://daily.dev/posts/indexer-extension-members-in-c-15-yabwnagyx","comment":[{"@type":"Comment","text":"The precedence rules are the most important part here: real indexers and implicit Index/Range behavior win, so an extension cannot silently rewrite existing semantics. That makes extension indexers feel safer for domain-specific collection types, though the preview-only requirement is a good reminder to keep experiments isolated until the language design settles.","datePublished":"2026-09-13T07:52:15.275Z","url":"https://daily.dev/posts/YabwnAGyx#c-XhzG5tTmO","author":{"@type":"Person","name":"Jenuel Oras Ganawed","url":"https://daily.dev/jenueldev","image":"https://media.daily.dev/image/upload/s--BadmiNyj--/f_auto/v1787625077/avatars/avatar_JJtZr4Sjm?_a=BAMAMicg0"}},{"@type":"Comment","text":"Can the compiler warn when an extension indexer can never be chosen? I’d probably blame my own code before I thought about overload resolution. Even a plain warning on the declaration would help.","datePublished":"2026-09-15T06:40:24.014Z","url":"https://daily.dev/posts/YabwnAGyx#c-xISBIQVXX","author":{"@type":"Person","name":"Agustin Barrientos","url":"https://daily.dev/agustinbarrientos","image":"https://media.daily.dev/image/upload/s--5ayxQnqn--/f_auto/v1788281802/avatars/avatar_wQYYVe5Tbj0NJ7C7qPoa8?_a=BAMAMicg0"}}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/indexer-extension-members-in-c-15-yabwnagyx#faq","mainEntity":[{"@type":"Question","name":"How do I write an extension indexer in C# 15?","acceptedAnswer":{"@type":"Answer","text":"Declare it inside an extension block using the same syntax pattern as other extension members: extension(IEnumerable\u003cint\u003e sequence) { public int this[int index] =\u003e sequence.ElementAt(index); }. This is a preview feature in .NET 11 preview 7, requiring LangVersion set to preview in the project file. It completes the extension members feature started in C# 14. Track new C# language previews like this one on daily.dev as you plan adoption of extension indexers."}},{"@type":"Question","name":"Why don't extension indexers work on arrays or strings in C#?","acceptedAnswer":{"@type":"Answer","text":"The current specification and baseline rules for array access and string access mean extension indexers don't function on arrays or strings, even though declaring such extension indexers is technically permitted by the compiler. This limitation is documented in the collapsed open issues section of the extension indexers feature specification for C# 15. Developers adopting new C# 15 features can follow gotchas like this one on daily.dev before shipping code."}},{"@type":"Question","name":"Do extension indexers take precedence over implicit Index and Range indexers in C#?","acceptedAnswer":{"@type":"Answer","text":"No, implicit Index and Range indexers always take precedence over extension indexers with the same type in C# 15. For example, if a type has an int indexer plus a Length or Count property, the Index indexer is implicitly supported and any extension Index indexer is ignored even if explicitly implemented. Keep up with precedence rules in evolving C# indexer features by following language updates on daily.dev."}}]}
```

