[Release notes](https://learn.microsoft.com/en-us/dotnet/core/whats-new/dotnet-9/overview#linq) [Docs](https://learn.microsoft.com/en-us/dotnet/api/system.linq.enumerable.index?view=net-9.0#system-linq-enumerable-index-1(system-collections-generic-ienumerable((-0)))) ```c# IEnumerable<string> lines2 = File.ReadAllLines("output.txt"); foreach ((int index, string line) in lines2.Index()) { Console.WriteLine($"Line number: {index + 1}, Line: {line}"); } ``` This could be translated via ROW_NUMBER, similar to #24218.