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

Solution: Logic statements and string compare - Visual Basic Tutorial

From the course: Visual Basic Essential Training

Start my 1-month free trial

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