In fact, you are referring to a language function called "logical expression short circuit":
This means the following: when the result of a logical expression can no longer change, for example. when it is clear that the expression will be evaluated as βtrueβ or βfalseβ, regardless of whether the remaining parts of the expression will be evaluated.
, #, Java JavaScript , ( ).
, MyClass null:
MyClass == null false- "", ,
myClass.Property > 0
MyClass null:
MyClass == null true- "", ,
- , .
, . VB , "myClass.Property > 0" , MyClass ( "Nothing" VB).