I just encountered this line in our code:
inspectActionResult.WorkActionResult &= ~WorkActionResult.Error;
WorkActionResult is a numbered enum, but what does the ~
do???
I just encountered this line in our code:
inspectActionResult.WorkActionResult &= ~WorkActionResult.Error;
WorkActionResult is a numbered enum, but what does the ~
do???
That is the logical (bitwise) NOT operator. It will flip all the bits of the operand, and return the result.
In your case, it is un-setting the bit represented by WorkActionResult.Error
(due to the &= before it).