Lecture overview -- Keyboard shortcut: 'u'  Previous page: Why operator overloading? -- Keyboard shortcut: 'p'  Next page: An example of overloaded operators: Interval -- Keyboard shortcut: 'n'  Lecture notes - all slides together  Annotated slide -- Keyboard shortcut: 't'  Textbook -- Keyboard shortcut: 'v'  Alphabetic index  Help page about these notes  Course home    Operators, Delegates, and Events - slide 3 : 20

Overloadable operators in C#
A subset of the C# operators are overloadable
Level Category Operators Associativity
14 Primary x.y      f(x)      a[x]      x++      x--      new      typeof      checked      unchecked      default      delegate left to right
13 Unary +      -      !      ~      ++x      --x      (T)x      true      false      sizeof left to right
12 Multiplicative *      /      % left to right
11 Additive +      - left to right
10 Shift <<      >> left to right
9 Relational and Type testing <      <=      >      >=      is      as left to right
8 Equality ==      != left to right
7 Logical/bitwise And & left to right
6 Logical/bitwise Xor ^ left to right
5 Logical/bitwise Or | left to right
4 Conditional And && left to right
3 Conditional Or || left to right
2 Conditional ?: right to left
1 Assignment =      *=      /=      %=      +=      -=      <<=      >>=      &=      ^=      |=      ??      => right to left