From the course: Visual Basic Essential Training
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Explore the comparison and logical operators - Visual Basic Tutorial
From the course: Visual Basic Essential Training
Explore the comparison and logical operators
- [Instructor] As you get into conditional code, also known as branching code, you'll need to understand logical and conditional expressions. I'm talking about expressions that evaluate to either true or false. And it's very common to create these expressions by comparing two values to each other. Conditional expressions written out as sentences might look like this. If condition is true then do some action. And we can build on this by adding a second sentence. Otherwise, if another condition is false then do a different action. The parts of these sentences where we say condition is true or condition is false is where we could use the visual basic comparison operators. Sometimes you'll want to examine multiple conditions before choosing the next action. We could write if condition is true and another condition is true then do some action. We could substitute the word or and make a sensible combination, too. The parts of…
Contents
-
-
-
-
-
-
-
-
-
-
-
-
(Locked)
Explore the arithmetic operators3m 24s
-
(Locked)
Explore the comparison and logical operators5m 56s
-
(Locked)
If and Else5m 16s
-
(Locked)
Use the And, Or logical operators3m 13s
-
(Locked)
Use AndAlso, OrElse for better performance2m 48s
-
(Locked)
Select Case3m 30s
-
(Locked)
Challenge: Logic statements and string compare1m 50s
-
(Locked)
Solution: Logic statements and string compare3m 16s
-
(Locked)
-
-
-
-