Code Analysis ReferenceAnalyzersRCS1239On this pageRCS1239: Use 'for' statement instead of 'while' statementPropertiesPropertyValueDefault SeverityInfoMinimum language version-ExamplesExample #1diagnostic.csint i = 0;while (x){ M(); i++;}fix.csfor (int i = 0; x; i++){ M();}Applies toExtension for VS 2022Extension for VS CodeExtension for Open VSXPackage Roslynator.Analyzers