Examining Visual Basic .NET's Operators

Simply having a variable with some value in it is not very interesting. Typically, we'd like to be able to perform some sort of operation on that variable or on multiple variables in tandem. For example, in mathematics there are numbers and operators. Numbers are things like 4, 17.5, pi, and so on, whereas operators are things like negate, add, subtract, divide, and so on.

Many of the traditional mathematical operators are operators in Visual Basic .NET. For example, to add together two numeric variables in VB.NET, the + operator is used. To multiply two numeric variables, the * operator is used.

There are different classes of operators, the most important being arithmetic operators, comparison operators, ...

Get SAMS Teach Yourself ASP.NET in 24 Hours now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.