Code inspection: Convert negated 'is' expression into 'is' expression with negated pattern
This inspection reports a negated is comparison that can be written as a negated pattern inside the is expression itself. This is the form preferred by modern C# and usually reads more clearly.
Example
if (!(o is > 42))
{
}
if (o is not > 42)
{
}
Quick-fix
Move the negation into the pattern and use is not.
30 March 2026