Skip to content

Latest commit

 

History

History
56 lines (41 loc) · 698 Bytes

RCS1103.md

File metadata and controls

56 lines (41 loc) · 698 Bytes

RCS1103: Convert 'if' to assignment

Property Value
Id RCS1103
Category Simplification
Severity Info

Examples

Code with Diagnostic

if (condition) // RCS1103
{
    f = true;
}
else
{
    f = false;
}

Code with Fix

f = condition;

Code with Diagnostic

if (x != null) // RCS1103
{
    y = x;
}
else
{
    y = null;
}

Code with Fix

y = x;

See Also

(Generated with DotMarkdown)