In Visual Basic all code is written inside of containers. This video looks at the three essential containers: modules, classes, and structures.
- [Instructor] It's time to write some visual basic code, … often called VB code, so I'll write that in notepad. … Here are some essential rules to follow. … All VB code must live inside a container. … The three containers I'll demonstrate … are modules, classes, and structures. … To create a module, type the word module. … And then the VB has a rule … that says you have to give the container a name, … so I'll call this one FirstModule. … Then move down a line or two, … and you will end this section of code, … this container, with the word End, … and then the type of container that you're closing. … So I'll type in End Module. … Now I'll do the same thing with a class. … I'll type in Class, the name of the class, … go down a line or two, and End the class. … Finally I'll make a structure, … and I'll end it, … the same way we ended the other ones with the word End, … and then the thing that I'm closing, … the container that I'm closing, like that. … Save the file. … And I'll attempt to compile it again. …
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: Code containers: Modules and classes