precedence definition


When several operators are used in an expression, each operator is evaluated in a predetermined order. Operators are evaluated in this order:
  • ^ (power)
  • - (negate)
  • * (multiply), / (divide)
  • \ (integer divide)
  • Mod (integer remainder)
  • + (add), - (difference)
  • << (shift left), >> (shift right)
  • & (string concatenate)
  • = (equal), <> (not equal), < (less than) > (greater than), <= (less than or equal to), >= (greater than or equal to), Like, (string similarity) New, (object creation) TypeOf, (object type) Is, (object equivalence) IsNot (object non-equivalence)
  • Not (bitwise invert)
  • And (bitwise and), AndAlso (short-circuit logical and)
  • Or (bitwise or), OrElse (short-circuit logical or)
  • Xor (bitwise exclusive-or)
  • Eqv (bitwise equivalence)
  • Imp (bitwise implication)
Operators shown on the same line are evaluated from left to right.