Skip to content

Latest commit

 

History

History
57 lines (36 loc) · 710 Bytes

RCS1215.md

File metadata and controls

57 lines (36 loc) · 710 Bytes

RCS1215: Expression is always equal to true/false

Property Value
Id RCS1215
Category Redundancy
Severity Warning

Examples

Code with Diagnostic

uint i = 0;

// ...

if (i >= 0) // RCS1215
{
}

Code with Diagnostic

var items = new List<object>();

// ...


if (items.Count < 0) // RCS1215
{
}

Code with Diagnostic

x == double.NaN

Code with Fix

double.IsNaN(x)

See Also

(Generated with DotMarkdown)