Code Analysis ReferenceAnalyzersRCS1124On this pageRCS1124: Inline local variablePropertiesPropertyValueDefault SeverityHiddenMinimum language version-ExamplesExample #1diagnostic.csIEnumerable<object> items = GetValues();foreach (object item in items){}fix.csforeach (object item in GetValues()){}Applies toExtension for VS 2022Extension for VS CodeExtension for Open VSXPackage Roslynator.Analyzers