1

I know what the following expression does; what I want to know is how is it called in the C# specification?

var a= new  int[3] { 1, 2, 3 };
a[^1];

Answer: 3

0x777
  • 825
  • 8
  • 14
  • Index from end. https://learn.microsoft.com/en-us/dotnet/csharp/language-reference/proposals/csharp-8.0/ranges – Dmitry Bychenko Jan 02 '20 at 19:12
  • 1
    Indices and ranges introduced in c# 8 - https://learn.microsoft.com/en-us/dotnet/csharp/whats-new/csharp-8#indices-and-ranges –  Jan 02 '20 at 19:13

0 Answers0