Use LINQ Index()
ProprietaryReplace collection.Select((item, index) => (index, item)) with collection.Index(). Available since .NET 9.
OpenRewrite. Recipes. CSharp. Migration. Dotnet. Net9. UseLinqIndexmod run . --recipe= OpenRewrite. Recipes. CSharp. Migration. Dotnet. Net9. UseLinqIndexInstall it once, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.