I do not know when to use the syntaxes Or
or OrElse
and / or And
or AndAlso
, because I do not understand what difference it makes in the logic circuit.
Being in C #, And
= &
, AndAlso
= &&
and Or
= |
, OrElse
= ||
.
I need to test the following expression to know if the integer lastToken
is zero (0) and also if it is greater than 2:
if(lastToken == 0 & lastToken > 2) { ... }
But I do not know if I use &
or &&
.
Which one should I use?