org.sonar.plugins.csharp.S2761.html Maven / Gradle / Ivy
Why is this an issue?
The repetition of a prefix operator (!
, or ~
) is usually a typo. The second operator invalidates the first one.
int v1 = 0;
bool v2 = false;
var v3 = !!v1; // Noncompliant: equivalent to "v1"
var v4 = ~~v2; // Noncompliant: equivalent to "v2"
© 2015 - 2024 Weber Informatics LLC | Privacy Policy