There is a XOR operator in C#!!!
For some reason, it’s impossible to find it by searching for “XOR” in MSDN (either in the index or using the search). I don’t know why they’re trying to hide that…
So anyway, it’s a simple bitwise operator: ^
C = A XOR B should be written: C = A^B;
(and there’s of course the complementary ^= which also performs an assignment)