C# Operators

Results are computed by building expressions. These expressions are built by combining variables and operators together into statements. The following table describes the allowable operators, their precedence, and associativity.
Operator category Operators
Arithmetic + - * / %
Logical (boolean and bitwise) & | ^ ! ~ && || true false
String concatenation +
Increment, decrement ++ --
Shift << >>
Relational == != <> <= >=
Assignment = += -= *= /= %= &= |= ^= <<= >>=
Member access .
Indexing []
Cast ()
Conditional ?:
Delegate concatenation and removal + -
Object creation new
Type information as is sizeof typeof
Overflow exception control checked unchecked
Indirection and Address * -> [] &
The above table includes some operator shortcuts that can be used in assignment expressions.
Here's a quick table that demonstrates operator shortcuts.
The Shortcut Operator in the expression Normal equivalent expression
x++ or ++x x = x + 1
x-- or --X x = x - 1
x += y x = x + y
x -= y x = x - y
x *= y x = x * y
x /= y x = x / y
x %= y x = x % y
x <<= y x = x << y
x >>= y x = x >> y
x &= y x = x & y
x |= y x = x | y
x ^= y x = x ^ y
14:18C# Tutorial