Possible Duplicate:
Why are there no ||= or &&= operators?
By pure accident I found out today that
a &= GetBool();
is NOT the same as
a = a && GetBool();
I must have misunderstood that for years. In the first Example, "GetBool()
" is executed even if "a" is false. In the second, it isn't.
Is there anything to achieve something like "&&=" in C#?