This is not a bug, as in nearly all programming languages C# evaluates &&
lazily - if the left operand is already false, the whole expression can never become true, so it's not required anymore to evaluate the right operand of the expression.
Flip the operands or change to success & SynchronizeAccount
to force evaluation of both operands.
Note that it's a unique feature of C# that you can apply both &
and &&
to boolean values - in most other languages including Java and PHP a single ampersand (&
) is the bitwise AND, which often provides completely different results.