Code Analysis ReferenceAnalyzersRCS1073On this pageRCS1073: Convert 'if' to 'return' statementPropertiesPropertyValueDefault SeverityInfoMinimum language version-ExamplesExample #1diagnostic.csif (x){ return true;}else{ return false;}fix.csreturn x;Example #2diagnostic.csif (x != null){ return x;}else{ return null;}fix.csreturn x;Applies toExtension for VS 2022Extension for VS CodeExtension for Open VSXPackage Roslynator.Analyzers