Use Cast<T>() instead of Select with cast
ProprietaryReplace .Select(x => (T)x) with .Cast<T>(). The Cast<T>() method is more concise and clearly expresses the intent.
OpenRewrite. Recipes. CSharp. CodeQuality. Linq. UseCastInsteadOfSelectmod run . --recipe= OpenRewrite. Recipes. CSharp. CodeQuality. Linq. UseCastInsteadOfSelectInstall it once, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.