This documentation is archived and is not being maintained.

7.6.3 Logical negation operator

Visual Studio .NET 2003

For an operation of the form !x, unary operator overload resolution (Section 7.2.3) is applied to select a specific operator implementation. The operand is converted to the parameter type of the selected operator, and the type of the result is the return type of the operator. Only one predefined logical negation operator exists:

bool operator !(bool x);

This operator computes the logical negation of the operand: If the operand is true, the result is false. If the operand is false, the result is true.