using System; namespace ConsoleApp { class Program { static void Main(string[] args) { PrintRange(); Console.WriteLine($"Last word is {words[^0]}"); } static void PrintRange() { var theQuickBrownFox = words[0..4]; foreach (var word in theQuickBrownFox) Console.Write($"< {word} >"); Console.WriteLine(); } static string[] 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 }; } }