Skip to content

Extension Indexer is not yet available #47280

@snuup

Description

@snuup

Type of issue

Typo

Description

Tried the examle for extensions and get

error CS9282: Extension declarations can include only methods or properties

for line

// Extension indexer:
public T this[int index] => source.Skip(index).First();

Page URL

https://learn.microsoft.com/en-us/dotnet/csharp/whats-new/csharp-14

Content source URL

https://github.com/dotnet/docs/blob/main/docs/csharp/whats-new/csharp-14.md

Document Version Independent Id

587ed47f-f532-e018-9b0d-6ee76afd20e4

Platform Id

0d86b10c-de00-895a-a330-d1f781b47d99

Article author

@BillWagner

Metadata

  • ID: c36588d0-6bdf-1740-220c-10b20bb88730
  • PlatformId: 0d86b10c-de00-895a-a330-d1f781b47d99
  • Service: dotnet-csharp
  • Sub-service: whats-new

Related Issues


Associated WorkItem - 454111

Metadata

Metadata

Assignees

Type

No type

Projects

Status

🔖 Ready

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions