Operators and Expressions
Boolean Logical Operators
Unary
!
(logical negation) operator.Binary
&
(logicalAND
),|
(logicalOR
), and^
(logical exclusiveOR
) operators. Those operators always evaluate both operands.Binary
&&
(conditional logicalAND
) and||
(conditional logicalOR
) operators. Those operators evaluate the right-hand operand only if it's necessary.
For operands of the integral numeric types, the &
, |
, and ^
operators perform bitwise logical operations.
Logical negation operator !
Logical AND operator &
Logical OR operator |
Logical exclusive OR operator ^
Conditional logical AND operator &&
Conditional logical OR operator ||
null-coalescing operators (?? and ??=)
Last updated