From the course: Visual Basic Essential Training

Unlock this course with a free trial

Join today to access over 24,500 courses taught by industry experts.

Explore the comparison and logical operators

Explore the comparison and logical operators - Visual Basic Tutorial

From the course: Visual Basic Essential Training

Explore the comparison and logical operators

- [Instructor] In this chapter we're exploring the Visual Basic operators and how we use them to build expressions. There are two categories of operators that work with Boolean values: comparison and logical. Comparison operators compare two values, and logical operators combine Boolean values. The comparison operators compare two expressions to determine whether they are equal, and if not how they differ. You might hear these called relational operators also because they can assess relationships between items. All comparison operators return a Boolean result. That makes them perfect for use in branching statements like this if statement. The equal to operator is probably the most used comparison operator. Here's the list of comparison operators. There's not much to say about them. They work just like their mathematical equivalents. You'll use them to compare values, and the result will always be either true or false. In most situations, you want to compare between similar types…

Contents