Clarification re the new feature "Implicit index access" #44907
Labels
dotnet-csharp/svc
okr-quality
Content-quality KR: Concerns article defects (bugs), freshness, or build warnings.
whats-new/subsvc
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 typeSystem.Index
, such as[(Index)0]
and[idx]
givenIndex idx = 0;
.It might also be worth a note saying that this doesn't work for multidimensional arrays, 'cos
Index
(andRange
) 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
Related Issues
The text was updated successfully, but these errors were encountered: