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.

Challenge: Logic statements and string compare

Challenge: Logic statements and string compare - Visual Basic Tutorial

From the course: Visual Basic Essential Training

Start my 1-month free trial

Challenge: Logic statements and string compare

(upbeat music) - [Instructor] For this challenge you'll work with logic statements and string comparison. The rules for this challenge are to create a search string application. The purpose is to determine if a user-entered word or phrase is found in the sample text. Rather than search for the results in a single string, we'll look through two separate strings for the search word. Then you can use logic statements to show whether the search word is found in the first string, the second string or both strings. In this example we're looking for the word we. As you can see, it's in both the first string and the second string, so we would output found in first, second and both. In the second example we're looking for the word called, and it's only available in the second string, so you would output something like found in second only. You can create this as a console application or as a Windows application. I'll use WPF.…

Contents