Boolean in C# are 1 byte variables. And because bool are shortcuts for the Boolean class, I would expect that the &=, |= operations have been overridden to let them work with the boolean types but I'm not so sure about it. There is nothing like &&= or ||= to be used.
Here's my question, doing something like:
bool result = condition;
result &= condition1;
result &= condition2;
will work but is it just because the bool will be 00000000 for false and 00000001 for true or because underneath the bool class will use something like &&= and ||= when the previous are called? Is it actually safe to use the previous notations or is better to use
bool result = condition;
result = result && condition1;
result = result && condition2;
to avoid any strange behavior?
Please note that conditions could be something like A >= B or any other possible check that will return a bool.