Wednesday, November 03, 2004

C# Operator Precedence

Table 3.3 Operator Precedence
Level Operator Types Operators
1 Primary operators -() . [] x++ x-- new typeof sizeof checked unchecked
2 Unary + - ! ~ ++x --x
3 Multiplicative * / %
4 Additive + -
5 Shift << >>
6 Relational < > <= >= is
7 Equality == !=
8 Logical AND &
9 Logical XOR ^
10 Logical OR |
11 Conditional AND &&
12 Conditional OR ||
13 Conditional ?:
14 Assignment = *= /= %= += -= <<= >>= &= ^= |=
Post a Comment