Chapter 7. Operators

   

An operator is a symbol (e.g., = , + , > , etc.) that causes VB.NET to take an action. That action might be an assignment of a value to a variable, the addition of two values, or a comparison of two values, etc.

In the previous chapters, you've seen a number of operators at work. For example, in Chapter 5 you saw the assignment operator used. The single equal sign ( = ) is used to assign a value to a variable, in this case the value 15 to the Integer variable myVariable:

 Dim myVariable As Integer = 15 

In Chapter 6, you saw more sophisticated operators, such as the greater than comparison operator (>) used to compare two values:

 If valueOne > valueTwo Then 

The preceding If statement compares valueOne with valueTwo; if the former is larger than the latter, the test evaluates true, and the If statement executes.

This chapter will consider many of the operators used in VB.NET in some detail.

   


Learning Visual Basic. NET
Learning Visual Basic .Net
ISBN: 0596003862
EAN: 2147483647
Year: 2002
Pages: 153
Authors: Jesse Liberty

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