+ 1
Exclusive OR?
Do C# and C++ have an exclusive OR (XOR) operator? So if only A or B is true it evaluates to true, but not if both A and B are true. In that case it evaluates to false.
3 Réponses
+ 1
C# also has ^ as XOR - https://msdn.microsoft.com/en-us/library/zkacc7k1.aspx?f=255&MSPPError=-2147217396
0
Yes, thank you for this quick explanation. But does that mean there's no XOR operator? Because in the way you describe 5 logical operators have to be evaluated by the program, where an XOR is 1 single operator.
0
Also slight mistake in your formula:
a && !b || !a && b is working better ;-)