Untitled Database

In C#, an operator is a program element that is applied to one or more operands in an expression or statement. Operators that take one operand, such as the increment operator (++) or new, are referred to as unary operators. Operators that take two operands, such as arithmetic operators (+,-,*,/), are referred to as binary operators. One operator, the conditional operator (?:), takes three operands and is the sole ternary operator in C#.

Syntax

Operator Precedence

Overloadable Operators

Overloading equality operators

Relational Operators

Implicit Cast and Explicit Cast Operators

Short-circuiting Operators

? : Ternary Operator

?. (Null Conditional Operator)

"Exclusive or" Operator

default Operator

Assignment operator '='

sizeof

?? Null-Coalescing Operator