Merge 'if' statements
Property | Value |
---|---|
Id | RR0075 |
Applicable Syntax | selected 'if' statements |
Enabled by Default | ✓ |
Usage
Example #1
before.cs
if (x)
{
return false;
}
if (y)
{
return false;
}
return true;
after.cs
if (x || y)
{
return false;
}
return true;
Configuration
roslynator_refactoring.merge_if_statements.enabled = true|false