Conditional expressions which are always true
or false
can lead to unreachable code.
In the case below, the call of Dispose()
never happens.
var a = false;
if (a)
{
Dispose(); // Never reached
}
Exceptions
This rule will not raise an issue in either of these cases:
In these cases, it is obvious the code is as intended.