Skip to main content

Split if-else

PropertyValue
IdRR0190
Applicable Syntaxif statement
Syntax Spanselected if statement or topmost if keyword
Enabled by Default

Usage

Example #1

before.cs
if (condition1)
{
return Foo1();
{
else if (condition2)
{
return Foo2();
}
else
{
return false;
}
after.cs
if (condition1)
{
return Foo1();
{

if (condition2)
{
return Foo2();
}

return false;

Configuration

roslynator_refactoring.split_if_else.enabled = true|false