Operator Precedence


The following table lists the operators in order of precedence. When evaluating an expression, the program evaluates an operator before it evaluates those lower than it in the list. When operators are on the same line, the program evaluates them from left to right.

Open table as spreadsheet

Operator

Description

^

Exponentiation

-

Negation

*, /

Multiplication and division

\

Integer division

Mod

Modulus

+, -, +

Addition, subtraction, and concatenation

&

Concatenation

<<, >>

Bit shift

=, <>, <, <=, >, >=, Like, Is, IsNot, TypeOf...Is

All comparisons

Not

Logical and bitwise negation

And, AndAlso

Logical and bitwise And with and without short-circuit evaluation

Xor, Or, OrElse

Logical and bitwise Xor, and Or with and without short-circuit evaluation

Use parentheses to change the order of evaluation and to make expressions easier to read.




Visual Basic 2005 with  .NET 3.0 Programmer's Reference
Visual Basic 2005 with .NET 3.0 Programmer's Reference
ISBN: 470137053
EAN: N/A
Year: 2007
Pages: 417

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net