Skip to main content

RCS1268: Simplify numeric comparison

Properties

PropertyValue
Default SeverityInfo
Minimum language version-

Examples

Example #1

diagnostic.cs
(a - b) == 0
fix.cs
a == b

Example #2

diagnostic.cs
(a - b) > 0
fix.cs
a > b

Example #3

diagnostic.cs
(a - b) >= 0
fix.cs
a >= b

Example #4

diagnostic.cs
(a - b) < 0
fix.cs
a < b

Example #5

diagnostic.cs
(a - b) <= 0
fix.cs
a <= b

Applies to