Export (0) Print
Expand All

7.9.4 Boolean equality operators

Visual Studio .NET 2003

The predefined Boolean equality operators are:

bool operator ==(bool x, bool y);
bool operator !=(bool x, bool y);

The result of == is true if both x and y are true or if both x and y are false. Otherwise, the result is false.

The result of != is false if both x and y are true or if both x and y are false. Otherwise, the result is true. When the operands are of type bool, the != operator produces the same result as the ^ operator.

Show:
© 2014 Microsoft