Skip to content

Latest commit

 

History

History
40 lines (29 loc) · 594 Bytes

RCS1211.md

File metadata and controls

40 lines (29 loc) · 594 Bytes

RCS1211: Remove unnecessary else clause

Property Value
Id RCS1211
Category Redundancy
Severity Hidden

Example

Code with Diagnostic

if (condition)
{
    return WhenTrue();
}
else // RCS1211
{
    return WhenFalse();
}

Code with Fix

if (condition)
{
    return WhenTrue();
}

return WhenFalse();

See Also

(Generated with DotMarkdown)