Skip to content

Latest commit

 

History

History
45 lines (35 loc) · 646 Bytes

RCS1006.md

File metadata and controls

45 lines (35 loc) · 646 Bytes

RCS1006: Merge else clause with nested if statement

Property Value
Id RCS1006
Category Simplification
Severity Hidden

Example

Code with Diagnostic

if (condition1)
{
    Foo1();
}
else
{ // RCS1006
    if (condition2)
    {
        Foo2();
    }
}

Code with Fix

if (condition1)
{
    Foo1();
}
else if (condition2)
{
    Foo2();
}

See Also

(Generated with DotMarkdown)