This is explained in section 8.7.1 of the C # 5 specification:
The first built-in if is available if the if is available and the logical expression does not have a constant false .
Although we can reason that this condition:
false && i < 30
always false , this is not a constant expression in accordance with the rules of the language (7.19), therefore the first built-in statement in the body is available.
This is not that everything related to && is not false. This is normal, for example:
if (false && true) { i++; }
... but since the expression i < 30 not constant, your original expression is not constant. This is true, although we know that expression will never be appreciated.
The language can decide that any && expression, where the LHS has a constant false expression, was also a constant expression with the value false , but this is not so. (This will be only a small added difficulty, but the level of benefits is very small.)
source share