From the course: Visual Basic Essential Training
Unlock the full course today
Join today to access over 22,500 courses taught by industry experts or purchase this course individually.
Solution: Logic statements and string compare - Visual Basic Tutorial
From the course: Visual Basic Essential Training
Solution: Logic statements and string compare
(upbeat music) - Welcome back. Here's my solution. Looking at the finished answer. I'm looking for the word pet. Looking through the strings, you can see it's available here in the first string. In the second string it's available in the same location, and it's also available here. So, I should get the results when I click on this button. Pet is found in the first string, it's found in the second string, and it's found in both strings. Now I'll look for the word fish. That's also found in all locations. You can see it here; fish. And the second location it's here in the word goldfish. So this is something you have to determine. Is this the kind of answer that you want? In my case, I decided that even if it's a sub-string of the word goldfish, that would be considered a match. Now let's look for the word blend. And that results in blend found in the first string, but not found in the second string. Now let's go take a…
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)
-
-
-
-