Split if-else
Property | Value |
---|---|
Id | RR0190 |
Applicable Syntax | if statement |
Syntax Span | selected 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