RCS1215: Expression is always equal to true/false
Properties
Property | Value |
---|---|
Default Severity | Warning |
Minimum language version | - |
Examples
Example #1
diagnostic.cs
uint i = 0;
// ...
if (i >= 0)
{
}
Example #2
diagnostic.cs
var items = new List<object>();
// ...
if (items.Count < 0)
{
}
Example #3
diagnostic.cs
x == double.NaN
fix.cs
double.IsNaN(x)