C# allows you to combine the aforementioned operators with OR (||), AND (&&), or XOR (^). These are applied to both operands in an expression.
The following table lists the logical, conditional, and null operators:
Expression | Description and example |
Logical OR (|) | This operator computes both operands and returns false if both are false. |
Logical AND (&) | This operator can be used in two forms: Unary address operator or Binary logical operator. When used as a Unary address operator, it returns the address of the operand. If used as a Binary, it evaluates both operands and returns true if both operands are true; otherwise, it will return false. |
Conditional AND (&&) | This conditional operator is ... |