Code inspection: Simplify negated relational pattern
This inspection reports a negated relational pattern that can be simplified to the opposite relational pattern. This makes the comparison easier to read.
Example
if (o is C { Boo: not > 1 })
{
}
if (o is C { Boo: <= 1 })
{
}
Quick-fix
Replace the negated relational pattern with the equivalent direct relational pattern.
29 March 2026