S2761 — 'Not' boolean operator should not be repeated

Language
VB.NET
Type
Bug
Severity
Major

Why is this an issue?

The repetition of the Not operator is usually a typo. The second operator invalidates the first one:


Dim b As Boolean = False
Dim c As Boolean = Not Not b 'Noncompliant: equivalent to "b"

↑ Back to top