Skip to content

Clarification re the new feature "Implicit index access" #44907

Closed
@RexJaeschke

Description

@RexJaeschke

Type of issue

Missing information

Description

I'm writing tests for this new feature for the Ecma C# standard, and have found that it's not just ^ that is now accepted in this context, but any expression of type System.Index, such as [(Index)0] and [idx] given Index idx = 0;.

It might also be worth a note saying that this doesn't work for multidimensional arrays, 'cos Index (and Range) still cannot be used in that context anyway.

Page URL

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

Content source URL

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

Document Version Independent Id

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

Article author

@BillWagner

Metadata

  • ID: c36588d0-6bdf-1740-220c-10b20bb88730
  • PlatformId: 33fc7d4f-a082-08f5-22e8-0c57d552ad33
  • Service: dotnet-csharp
  • Sub-service: whats-new

Related Issues


Associated WorkItem - 402708

Metadata

Metadata

Assignees

Labels

📌 seQUESTeredIdentifies that an issue has been imported into Quest.dotnet-csharp/svcokr-qualityContent-quality KR: Concerns article defects (bugs), freshness, or build warnings.whats-new/subsvc

Type

No type

Projects

Status

✅ Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions