JetBrains Rider 2024.1 Help

Code Inspection: Double negation operator

Category

Redundancies in Code

ID

DoubleNegationOperator

EditorConfig

resharper_double_negation_operator_highlighting

Default severity

Suggestion

Language

C#

Requires SWA

No

Double negation, such as writing !!something is meaningless and can be safely removed. The only exception would be types such as DBbool where the negation operator is overloaded.

Last modified: 15 April 2024