Table of Contents

Below is a complete list of the operands sorted by order of operation.

Precedence Operator Description Associativity
1 () function call LeftToRight
------------ ---------------
[] index operator
. dot operator
2 as casting operator
------------
3 + unary plus RightToLeft
------------ ---------------
- unary minus
++ pre-increment
-- pre-decrement
! not
~ bitwise negation
@ property delegate
4 ^ exponent LeftToRight
------------ ---------------
5 * multiplication
------------
/ division
% modulo, remainder
6 + addition
------------
- subtraction
7 << bitshift left
------------
>> bitshift right
8 < less than
------------
<= less than or equal to
> greater than
>= greater than or equal to
9 == equality
------------
!= inequality
10 & bitwise and
------------
11 $ bitwise xor
------------
12 | bitwise or
------------
13 && logical and
------------
14 || logical or
------------
15 = assignment RightToLeft
------------ ---------------
+= assignment of sum
-= assignment of difference
*= assignment of product
/= assignment of quotient
%= assignment of remainder
^= assignment of power
<<= assignment of bitwise left shift
>>= assignment of bitwise right shift
&= assignment of bitwise and
$= assignment of bitwise xor
|= assignment of bitwise or