Skip to content

Latest commit

 

History

History
44 lines (33 loc) · 585 Bytes

RCS1179.md

File metadata and controls

44 lines (33 loc) · 585 Bytes

RCS1179: Unnecessary assignment

Property Value
Id RCS1179
Category Simplification
Severity Info

Example

Code with Diagnostic

if (condition) // RCS1179
{
    x = 1;
}
else
{
    x = 2;
}

return x;

Code with Fix

if (condition)
{
    return 1;
}
else
{
    return 2;
}

See Also

(Generated with DotMarkdown)