Skip to content

Latest commit

 

History

History
56 lines (36 loc) · 784 Bytes

RCS1104.md

File metadata and controls

56 lines (36 loc) · 784 Bytes

RCS1104: Simplify conditional expression

Property Value
Id RCS1104
Category Simplification
Severity Info

Examples

Code with Diagnostic

bool x = y ? true : false; // RCS1104

Code with Fix

bool x = y;

Code with Diagnostic

bool x = y ? z : false; // RCS1104

Code with Fix

bool x = y && z;

Code with Diagnostic

bool x = y ? true : z; // RCS1104

Code with Fix

bool x = y || z;

See Also

(Generated with DotMarkdown)