var words = new string[]
{
// index from start index from end
"The", // 0 ^9
"quick", // 1 ^8
"brown", // 2 ^7
"fox", // 3 ^6
"jumped", // 4 ^5
"over", // 5 ^4
"the", // 6 ^3
"lazy", // 7 ^2
"dog" // 8 ^1
}; // 9 (or words.Length) ^0
// negative indexing is supported only in C# 8.0 and above
var favoriteShows = new string[] { "Firefly", "Cowboy Bebop", "Samurai Champloo" };
Console.WriteLine(favoriteShows[^1]); // "Samurai Champloo"
Console.WriteLine(favoriteShows[^2]); // "Cowboy Bebop"
Index idx = ^3; // You can declare an index as a variable
Console.WriteLine(favoriteShows[idx]); // "Firefly"