Skip to main content

Merge 'if' statements

PropertyValue
IdRR0075
Applicable Syntaxselected '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