// 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"