Comparison Operators

Like its predecessors, Visual Basic 2015 still defines some comparison operators. Typically, comparison operators are of three kinds: numeric operators, string operators, and object operators. Let’s see these operators in detail.

Numeric Comparison Operators

You can compare numeric values by using the operators listed in Table 4.12.

Image

TABLE 4.12 Numeric Comparison Operators

These operators return a Boolean value that is True or False. The following code snippet shows an example (comments within the code contain the Boolean value returned):

Sub NumericOperators()    Dim firstNumber As Double ...

Get Visual Basic 2015 Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.