Code Analysis ReferenceAnalyzersRCS0041On this pageRCS0041: Remove new line between 'if' keyword and 'else' keywordPropertiesPropertyValueDefault Severitydisabled by defaultMinimum language version-ExamplesExample #1diagnostic.csif (x){ Foo();}elseif (y){ Bar();}fix.csif (x){ Foo();}else if (y){ Bar();}Applies toExtension for VS 2022Extension for VS CodeExtension for Open VSXPackage Roslynator.Formatting.Analyzers