Learn how to add a loop to a console application to keep the application running indefinitely.
- [Instructor] For this video I want … to look at how to write an indefinite loop … inside the main method. … Before I show you the code let's look at the project. … To see this project you need to have it open, … the correct branch from GitHub. … So let's review that. … Go to Team Explorer, go to Home, go to Branches, … go to the remote section. … This represents your connection to GitHub. … Find 05-02, right click on that and choose checkout. … Once you've checked out the code and have it … in your local hard drive, go to Solution Explorer. … And there'll be a solution called VB Essential Training. … For this demonstration it has two projects. … Example Console and Example Desktop. … The code we're writing is an Example Console … so make sure that the startup project … by right-clicking and choosing set as startup project. … Open up Module1.vb by double clicking on it. … And there's some code I've already added to Sub Main. … Recall that using console.read or console.readline … is one way to stop the program …
Author
Released
10/18/2019- Visual Basic syntax
- Using .NET classes in your application
- Declaring variables and data types
- Working with numbers and dates
- Using strings
- Repeating blocks of code with loops
- Evaluating conditions with if, then, and else
- Debugging and handling exceptions
- Working with lists
Skill Level Beginner
Duration
Views
Related Courses
-
Visual Studio 2019 Essential Training
with Walt Ritscher4h 24m Intermediate -
Developing with Visual Studio Code
with Jesse Liberty57m 23s Beginner -
Visual Studio for Mac
with Bruce Van Horn4h 10m Beginner -
Learning Visual Studio Code
with Reynald Adolphe1h 20m Beginner
-
Introduction
-
What you should know1m 38s
-
Setup packages4m 14s
-
1. Build Your First Simple Applications
-
Work with the Console class2m 27s
-
2. Create Projects in Visual Studio
-
Edit the code3m 51s
-
Compile the project code1m 58s
-
3. Work with Multiple Projects
-
Choose a startup project3m 8s
-
Add click event handler code3m 13s
-
4. Setting Up Your Environment
-
Work with Git branches2m 39s
-
5. Program Flow
-
Understand default code flow5m 13s
-
Create a program loop5m 19s
-
-
6. The Visual Basic Ecosystem
-
.NET and .NET core4m 17s
-
7. Variables and Constants
-
Declare a variable6m 30s
-
Understand variable scope5m 42s
-
Convert numeric values5m 43s
-
Work with strings7m 11s
-
Work with dates and times9m 21s
-
8. Refactor Your Code into Functions and Subs
-
Add procedures to module3m 35s
-
Add procedures to class1m 50s
-
Add code to functions2m 22s
-
9. Debugging Your Code
-
Add breakpoints to code4m 10s
-
Step through code4m 2s
-
Use the Watch windows4m 24s
-
-
10. Control Flow: Branch Statements
-
If and Else5m 16s
-
Select Case3m 30s
-
11. Control Flow: Loop Statements
-
Solution: Pentagonal numbers2m 44s
-
12. Work with Lists
-
Create new collections4m 49s
-
Iterate over list5m 39s
-
Interesting list properties4m 42s
-
Work with extension methods2m 40s
-
Use LINQ with lists5m 14s
-
13. Error Handling
-
Logging exceptions4m 58s
-
Continuing Your Journey
-
Next steps55s
-
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.
CancelTake notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.
Share this video
Embed this video
Video: Create a program loop