Code Analysis ReferenceAnalyzersRCS1006On this pageRCS1006: Merge 'else' with nested 'if'PropertiesPropertyValueDefault SeverityHiddenMinimum language version-ExamplesExample #1diagnostic.csif (condition1){ Foo1();}else{ if (condition2) { Foo2(); }}fix.csif (condition1){ Foo1();}else if (condition2){ Foo2();}Applies toExtension for VS 2022Extension for VS CodeExtension for Open VSXPackage Roslynator.Analyzers