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.
Challenge: Logic statements and string compare - Visual Basic Tutorial
From the course: Visual Basic Essential Training
Challenge: Logic statements and string compare
(upbeat instrumental music) - [Instructor] For this code challenge, you'll work with logic statements, and string comparison. The goal of this challenge is to develop an application that checks whether a user entered word or phrase is present in a sample text. Instead of searching within a single string, you'll search within two separate strings for the target word or phrase. You will then use logical statements to indicate if the search word is found in the first string, the second string or both strings. Here is an example. We're looking for the word we. It's there in 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, that's only available in the second string, so you would output found in second only. I provided a starter project as an option for creating a Windows application. You can use it or build your own system. Here is the template. I'll build my solution from this UI. At the…
Download courses and learn on the go
Watch courses on your mobile device without an internet connection. Download courses using your iOS or Android LinkedIn Learning app.
Contents
-
-
Chapter roadmap4m 33s
-
(Locked)
Set up the tools1m 45s
-
(Locked)
Create a console app1m 46s
-
(Locked)
What files are in the new project2m 23s
-
(Locked)
Build and compile the application2m 10s
-
(Locked)
Run the application4m 49s
-
(Locked)
Work with the console class2m 1s
-
(Locked)
The forgiving nature of VB code2m 2s
-
-
-
(Locked)
Optimize the Visual Studio settings1m 55s
-
(Locked)
Create a console project in Visual Studio4m 2s
-
(Locked)
Projects and solutions2m 5s
-
(Locked)
Examine the template structure and code1m 45s
-
(Locked)
How the editor enhances our code3m
-
Use the auto suggestions when editing5m 21s
-
(Locked)
Compile the project code2m 9s
-
(Locked)
Run the example code from Visual Studio2m 28s
-
(Locked)
Run the example code with a debugger2m 23s
-
(Locked)
-
-
(Locked)
Understand default code flow for an application6m 49s
-
(Locked)
Event driven code3m 21s
-
(Locked)
Create a program loop to run an application indefinitely4m 52s
-
(Locked)
Listen for KeyChar to terminate the loop3m 9s
-
(Locked)
The To-Do application1m 18s
-
Work with a Windows UI project4m 49s
-
(Locked)
Add click event handler code3m 29s
-
(Locked)
Add TextChanged event handler code2m 30s
-
(Locked)
-
-
(Locked)
Work with variables and constants8m 17s
-
(Locked)
Use the code explorer project3m 26s
-
(Locked)
Declare a variable5m 35s
-
(Locked)
Variables and .NET types3m 36s
-
(Locked)
Naming your variables2m 19s
-
(Locked)
Understand the variable scope: What code can access the variable4m 19s
-
How data conversion works7m 49s
-
(Locked)
Convert numeric values5m 35s
-
(Locked)
Create custom constants1m 29s
-
(Locked)
Work with built-in constants3m 36s
-
(Locked)
Work with enum values3m 45s
-
(Locked)
Create a custom enum1m 35s
-
(Locked)
-
-
(Locked)
Understanding strings6m 41s
-
(Locked)
Create string variables4m
-
(Locked)
Concatenation and interpolation2m 56s
-
(Locked)
Search string contents2m 59s
-
(Locked)
Modify string contents3m 3s
-
(Locked)
String creation with StringBuilder5m 39s
-
(Locked)
Compare and equals5m 51s
-
(Locked)
Convert and format numbers to strings8m 4s
-
(Locked)
Implicit covert strings to numbers2m 50s
-
(Locked)
Use Parse and TryParse conversions5m 4s
-
(Locked)
-
-
(Locked)
The date types2m 27s
-
(Locked)
Define date and time variables1m 6s
-
(Locked)
Initialize date and time values4m 42s
-
(Locked)
Output formatted date values3m 50s
-
(Locked)
Date manipulation2m 14s
-
(Locked)
Challenge: Strings, dates, and parsing1m 47s
-
(Locked)
Solution: Strings, dates, and parsing2m 22s
-
(Locked)
-
-
(Locked)
The Code Explorer updated UI58s
-
(Locked)
If and else statements5m 44s
-
(Locked)
Use the AndAlso and OrElse logical operators4m 12s
-
(Locked)
Select case: A better way to branch5m 1s
-
(Locked)
Challenge: Logic statements and string compare2m 5s
-
(Locked)
Solution: Logic statements and string compare2m 51s
-
(Locked)
-
-
(Locked)
Explore the collection classes10m 18s
-
(Locked)
Use a ListBox instead of a text control3m 10s
-
(Locked)
Create new collections6m 30s
-
(Locked)
Initialize a collection2m 23s
-
(Locked)
Add items to a list1m 13s
-
(Locked)
Get items from the list3m 16s
-
(Locked)
Remove items from a list1m 15s
-
(Locked)
Iterate over a list5m 20s
-
(Locked)
Bind a list to a user control5m 46s
-
(Locked)
Delegates and lambda expressions4m 36s
-
(Locked)
Customize a method with predicate functions5m 21s
-
(Locked)
Quick look at other collection classes4m 28s
-
(Locked)