Learn your way! Get started

Learning to Program Using Visual Basic 2010

with experts Ken Getz, Robert Green


Course at a glance

Included in these subscriptions:

  • Dev & IT Pro Video
  • Dev & IT Pro Power Pack

Release date 3/18/2011
Level Beginner
Runtime 17h 2m
Closed captioning N/A
Transcript N/A
eBooks / courseware Included
Hands-on labs Included
Sample code Included
Exams Included


Enterprise Solutions

Need reporting, custom learning tracks, or SCORM? Learn More



Course description

In this course, you will learn to use Visual Studio 2010 to explore the Visual Basic language. The course starts with a quick overview of the .NET platform, examining assemblies, Microsoft Intermediate Language, Visual Studio profiles, XML comments, IntelliSense, and debugging. From there, you will learn all the language features that you must internalize in order to create full-featured Web or Windows applications that make best use of the .NET platform. You will learn about data types, variables, and operators, along with all the important flow control structures. You will work through several examples demonstrating the power of the .NET Framework, and dig into creating and consuming your own classes and objects. The course moves on to working with data structures, such as arrays and collection classes, before finishing up with discussions of generics, handling exceptions and working with delegates and events. The course concludes by introducing the new LINQ-oriented features including anonymous types, lambda expressions, and more. By the end of this course, you will understand the important basic concepts that will allow you to start creating the applications you need.

Prerequisites

This course assumes that students have some programming background. No specific experience with Visual Studio 2010 or the .NET Framework is required. As with any such course, the more experience you bring to the course, the more you’ll get out of it. This course moves quickly through a broad range of programming topics, but it does not require any prior .NET skills.

Meet the experts

Ken Getz is a featured instructor for several of our Visual Studio courses. He is a Visual Basic and Visual C# expert and has been recognized multiple times as a Microsoft MVP. Ken is a seasoned instructor, successful consultant, and the author or co-author of several best-selling books. He is a frequent speaker at technical conferences like Tech-Ed, VSLive, and DevConnections and he has written for several of the industry's most-respected publications including Visual Studio Magazine, CoDe Magazine, and MSDN Magazine.

Robert Green is a Visual Studio expert and a featured instructor for several of our Visual Basic and Visual C# courses. He is currently a Technical Evangelist in the Developer Platform and Evangelism (DPE) group at Microsoft. He has also worked for Microsoft on the Developer Tools marketing team and as Community Lead on the Visual Basic team. Robert has several years of consulting experience focused on developer training and is a frequent speaker at technology conferences including TechEd, VSLive, VSConnections, and Advisor Live.

Course outline



Module 1

Introduction to .NET (36:33)
  • Introduction (02:03)
  • Overview of .NET (02:05)
  • Why Use .NET (01:04)
  • Advantages of .NET (04:44)
  • Common Language Runtime (01:14)
  • Running Code and the CLR (00:48)
  • CLR and Compilers (00:45)
  • Just-in-Time Compiler (JIT) (01:56)
  • Framework Base Class Library (01:39)
  • Common BCL Namespaces (04:17)
  • .NET Languages (00:57)
  • Overview: Assemblies (00:50)
  • Overview: Manifest (00:39)
  • Create with .NET (01:18)
  • Use Command Line Compiler (01:17)
  • First VB App in Notepad (02:05)
  • Examine the Code in the App (04:21)
  • Manifest of the App (03:29)
  • Summary (00:54)
Introduction to Visual Studio (22:57)
  • Introduction (00:30)
  • Working with Profile Settings (00:52)
  • Explore Profile Settings (02:37)
  • Set Save Project Location (00:49)
  • Create a New Project (00:59)
  • Windows in Visual Studio (01:28)
  • Pin / Unpin Windows (01:04)
  • Reset Window Layout (00:39)
  • Work with Files in the Project (01:10)
  • Set Project Properties (02:50)
  • Add a Reference (00:45)
  • View References (00:42)
  • View Object Browser (01:17)
  • Add Code to the Application (01:56)
  • Module Keyword Explained (01:05)
  • Adding Comments (00:25)
  • Using IntelliSense (02:18)
  • Build and Run the Application (00:40)
  • Summary (00:42)
Debugging (18:28)
  • Introduction (00:52)
  • Overview (00:48)
  • Create a Sample (05:07)
  • Run the Sample (00:26)
  • Syntax Error (00:52)
  • View Error List Window (01:16)
  • Breakpoints (00:25)
  • Autos / Immediate Window (00:55)
  • Single Step Through Code (02:06)
  • Clear All Breakpoints (00:11)
  • Runtime Error (00:33)
  • Try/Catch Block (01:15)
  • Investigating Exceptions (01:33)
  • Logic Error (01:07)
  • Summary (00:54)

Module 2

Intro to Variables / Data Types (43:48)
  • Introduction (00:58)
  • Overview: Variables (05:42)
  • Create / Use Variables / Scope (04:06)
  • Overview: Data Types (01:34)
  • DT: Integer (03:58)
  • Overview: DT Fields/Methods (01:00)
  • DT: Floating-point (00:55)
  • DT: Decimal (01:22)
  • Floating-point Data Type (01:15)
  • Convert to Strings (01:46)
  • Decimal Data Type (05:13)
  • DT: Char / String (02:37)
  • DT: Boolean / Date/Object (03:44)
  • Char Data Type (04:09)
  • String Data Type (00:32)
  • Boolean Data Type (00:46)
  • Date Data Type (01:10)
  • Object Data Type (02:01)
  • Summary (00:52)
Variables / Data Types (48:00)
  • Introduction (00:57)
  • Converting Data Types (03:29)
  • Value vs Reference Types (03:22)
  • Converting Data Types (01:49)
  • Using Conversion Functions (04:31)
  • Using ConvertClass (01:11)
  • Using Parse (01:24)
  • Value / Reference Types (03:06)
  • Const. / Enum. / Struct. (01:37)
  • Constants / Enumerations (02:50)
  • Structures (01:24)
  • Operators (05:13)
  • Arithmetic / String Operators (05:17)
  • Comparison/Logical Operators (06:55)
  • Type Operators (01:00)
  • Operator Precedence (03:29)
  • Summary (00:17)

Module 3

.NET Framework Classes (38:03)
  • Introduction (00:36)
  • Base Class Library (BCL) (00:53)
  • Some BCL Namespaces (01:32)
  • Using Framework Classes (02:26)
  • Generating Random Numbers (00:32)
  • Retrieving Computer Info (00:52)
  • Generate Random Numbers (01:19)
  • Retrieve Computer Info Demo (02:48)
  • Working with XML (03:29)
  • Write XML (04:40)
  • Read XML (04:42)
  • File Input / Output (00:17)
  • Write to / Read from Files (00:22)
  • Managing Files (01:26)
  • Managing Directories (00:38)
  • Retrieve Drive Info (01:04)
  • StreamWriter/StreamReader (02:10)
  • FileInfo Class (03:25)
  • DirectoryInfo Class (02:43)
  • DriveInfo Class (01:26)
  • Summary (00:30)
Strings and Dates (46:38)
  • Introduction (01:12)
  • Overview: Strings (00:45)
  • Comparing / Searching Strings (02:08)
  • Compare / Search Strings (06:03)
  • Modifying / Extracting Strings (03:20)
  • Modify Strings (05:37)
  • Extract Strings (04:37)
  • Formatting Strings (02:12)
  • Stringbuilder Class (01:20)
  • Format Strings / Dates (04:04)
  • Stringbuilder Class (03:44)
  • DateTime / TimeSpan (03:03)
  • DateTime Properties (02:46)
  • DateTime Methods (01:44)
  • TimeSpan Properties (03:10)
  • Summary (00:43)

Module 4

The My Namespace (15:53)
  • Introduction (00:43)
  • Overview (00:50)
  • My.Application (00:49)
  • My.Computer (03:01)
  • My.User (00:44)
  • Demo: MyNamespace (00:18)
  • Demo: MyApplication (01:22)
  • Demo: MyComputer (05:45)
  • Demo: MyUser (01:27)
  • Summary (00:48)
Branching (32:50)
  • Introduction (00:43)
  • Branching in Code (00:23)
  • Conditional Branching (00:50)
  • If Statements (00:27)
  • Simple If statements (04:07)
  • TryParse Method (01:54)
  • Nested If Statement (01:14)
  • Test for Multiple Conditions (03:37)
  • Select Case Statement (00:28)
  • Test for Single Condition (01:50)
  • Select Case (02:50)
  • More Complex Select Case (04:18)
  • Repeating Code Blocks (00:31)
  • Unbounded Looping (00:10)
  • While Loop (00:30)
  • Do Loop (00:50)
  • Demo: While Loop (03:20)
  • Demo: Do Loop (04:13)
  • Summary (00:26)
Looping (20:35)
  • Introduction (00:51)
  • For Loops (01:36)
  • Using For Loops (05:39)
  • Use Loops with .NET (00:33)
  • List Drives w/For Loop (02:16)
  • For Each Loop (00:24)
  • List Drives w/For Each Loop (01:21)
  • Compare For and For Each (02:13)
  • Unconditional Branching (01:12)
  • Using the Exit Statement (00:29)
  • Using Goto (01:32)
  • Exiting a For Loop (01:37)
  • Summary (00:46)

Module 5

Introduction to Classes (49:53)
  • Introduction (01:03)
  • Revisit .NET FW Classes (02:39)
  • View Help Documentation (01:47)
  • Classes as Templates (01:25)
  • Class Constructors (02:22)
  • Shared vs Instance (00:25)
  • Different Types of Members (01:15)
  • Which is Shared or Instance (01:32)
  • Creating Your Own Classes (00:45)
  • Objects as Things (00:43)
  • Creating Your First Class (02:00)
  • IntelliSense at Work (04:07)
  • Adding XML Comments (00:38)
  • Add an Overloaded Method (03:14)
  • Using the Class View Window (01:19)
  • Using the Class Designer (01:43)
  • Create w/ Class Designer (07:10)
  • Investigate the Created Class (01:47)
  • Add Code to Finish the Class (08:01)
  • Test the Class (04:53)
  • Summary (00:57)
Working with Classes (42:20)
  • Introduction (01:02)
  • Specific Issues with Classes (00:38)
  • Value vs Reference Types (01:12)
  • Initial Values (01:38)
  • Working with Null References (02:22)
  • Intro to Garbage Collector (02:07)
  • Releasing Memory (02:11)
  • Overriding Finalize (04:40)
  • Deterministic Finalization (02:32)
  • Demo: Deterministic Final. (06:21)
  • Override Object Class Func. (00:45)
  • ToString Method (02:28)
  • Manipulating Object Ref. (01:11)
  • Copy Ref. vs Copy Value (02:42)
  • Instance vs Shared Members (01:22)
  • Instance/Shared Members (05:11)
  • Modules and Classes (03:04)
  • Summary (00:45)

Module 6

Properties (21:49)
  • Introduction (00:55)
  • Overview (02:11)
  • Calculate Property Values (00:34)
  • Validate Property Values (01:02)
  • Pass Args. to Properties (00:59)
  • Demo: Read / Write Properties (02:30)
  • Demo: Calculated Property (04:15)
  • Demo: Validate a Property (02:27)
  • Demo: Passing Arguments (05:34)
  • Summary (01:17)
Methods (34:02)
  • Introduction (00:45)
  • Overview (02:01)
  • Passing Arguments to Methods (01:02)
  • Passing Arguments (03:23)
  • Class Constructors (00:59)
  • Constructors (10:05)
  • Saving / Retrieving Information (01:22)
  • Demo: Saving Information (05:27)
  • Demo: Retrieving Information (07:04)
  • Summary (01:49)
Advanced Methods (29:40)
  • Introduction (00:29)
  • Returning / Passing Arrays (01:25)
  • Returning an Array (02:35)
  • Pass a Parameter Array (03:57)
  • Optional / Named Parameters (01:59)
  • Using Optional Parameters (04:19)
  • Using Named Arguments (03:35)
  • Static vs Instance Members (02:11)
  • Using Static Variables (02:30)
  • Using a Static Field (03:56)
  • Using a Static Method (01:17)
  • Summary (01:21)

Module 7

Inheritance (54:08)
  • Introduction (01:28)
  • Overview (04:58)
  • Polymorphism (02:24)
  • Add Mem. to Derived Classes (00:47)
  • Explore the Sample (02:36)
  • Base Class Members (03:02)
  • Inherited Members (02:40)
  • Demo: Add Members to DC (05:58)
  • Overloading Derived Members (00:53)
  • Calling Base Class Members (01:08)
  • Demo: Overriding DM (05:27)
  • Demo: Overloading DM (02:51)
  • Demo: Calling BC Members (04:48)
  • Abstract Classes and Members (02:49)
  • Sealed Classes and Members (01:02)
  • Abstract Classes (06:08)
  • Sealed Classes (03:16)
  • Summary (01:45)
Interfaces (17:24)
  • Introduction (00:47)
  • Overview (00:47)
  • Implementing an Interface (00:51)
  • Interfaces in the .NET FW (01:07)
  • Define an Interface (01:50)
  • Implement an Interface (02:02)
  • IComparable Interface (08:01)
  • Summary (01:57)
Organizing Classes (25:05)
  • Introduction (00:54)
  • Overview (00:38)
  • Partial Classes (01:06)
  • Nested Classes (01:52)
  • Namespaces (01:52)
  • Demo: Partial Classes (03:03)
  • Demo: Nested Classes (08:18)
  • Demo: Class Library Properties (02:00)
  • Demo: Add Ref. to Library (01:09)
  • Demo: External Assemblies (01:16)
  • Demo: Nested Namespaces (02:35)
  • Summary (00:18)

Module 8

Introduction to Arrays (33:37)
  • Introduction (01:04)
  • Working with Arrays (01:51)
  • One Variable vs Many (00:33)
  • Array Sample (02:43)
  • Visualizing Arrays (00:56)
  • Arrays Under the Covers (00:42)
  • Create and Fill Arrays (00:37)
  • Resize Arrays (01:21)
  • Assign References to Arrays (02:31)
  • Cloning an Array (01:49)
  • Arrays of Objects (03:53)
  • Multi-Dimensional Arrays (02:39)
  • Retrieving Data From an Array (03:17)
  • Pass an Array as a Parameter (01:48)
  • Arrays and Method Parameters (00:56)
  • Work with Method Parameters (02:04)
  • Auto-Array Parameter Rules (00:40)
  • Arrays in the .NET Framework (00:36)
  • String.Split Method (00:46)
  • Process.GetProcesses Method (01:17)
  • Summary (01:23)
Manipulating Arrays (32:31)
  • Introduction (00:44)
  • Manipulating Arrays (01:36)
  • Sorting Arrays (01:40)
  • Sorting with IComparable (05:33)
  • More Flexible Sorting (04:43)
  • A Smarter IComparer (03:19)
  • Making it Easier (00:53)
  • Avoiding IComparer (03:12)
  • Summarizing Sorting Options (01:05)
  • Searching in Arrays (03:38)
  • Searching Arrays (03:20)
  • FindAll (01:36)
  • Summary (01:07)

Module 9

Motivating Delegates (20:49)
  • Introduction (00:43)
  • Motivating Delegates (01:01)
  • Demo: FileSearch0 (03:42)
  • FileSearch1 (00:57)
  • Demo: FileSearch1 (02:40)
  • Event Interface Class (00:53)
  • IFileFoundHandler (05:30)
  • Adding Multiple Handlers (01:16)
  • Multiple Handlers (01:20)
  • Multiple Listeners (01:20)
  • Summary (01:20)
Introducing Delegates (21:47)
  • Introduction (01:03)
  • Introducing Delegates (02:59)
  • Declare / Invoke Delegate (03:31)
  • Instance Delegate (01:41)
  • Shared Delegate (02:56)
  • Digging Deeper into Delegates (00:49)
  • Delegates with ILDASM (02:05)
  • Delegate v. MulticastDelegate (01:29)
  • Multicast Delegate (03:33)
  • Summary (01:37)
Events (34:28)
  • Introduction (00:54)
  • Working with Events (02:13)
  • Events Like in VB6 (00:32)
  • Demo: Raising Events (03:45)
  • Multiple Handlers (02:57)
  • Events with ILDASM (03:44)
  • Exceptions and Multiple Events (01:36)
  • Demo: Raising Events (03:24)
  • Manually Raising Events (04:46)
  • .NET Event Design Pattern (06:41)
  • Add/Remove Handlers Dynam. (03:20)
  • Summary (00:30)

Module 10

Introducing Generics (18:08)
  • Introduction (00:33)
  • Overview: Generics (00:54)
  • Generic Methods (01:04)
  • Generic Classes (00:41)
  • Demo: Swapping Values (03:43)
  • Demo: Generic Methods (04:08)
  • Demo: Generic Classes (05:36)
  • Summary (01:26)
Generics and Arrays (29:11)
  • Introduction (00:48)
  • Overview (00:27)
  • Sorting Arrays (01:12)
  • Sort with IComparer (00:39)
  • Demo: Sorting Arrays (03:54)
  • Demo: Sort with IComparer (05:18)
  • Sorting with Generic Comp. (01:03)
  • Search w/ Generic Predicates (01:16)
  • Demo: Sorting w/GC (06:49)
  • Demo: Searching in Arrays (01:05)
  • Demo: Searching w/GP (06:07)
  • Summary (00:27)
Generic Interfaces/Constraints (18:10)
  • Introduction (00:39)
  • Overview: Generic Interfaces (00:54)
  • Generic Constraints (00:29)
  • Generic Sorting Arrays (04:46)
  • Generic Sort w/ ICompare (03:47)
  • Generic Comparison (01:42)
  • Generic Compare Method (05:05)
  • Summary (00:45)
Generic Lists (11:16)
  • Introduction (00:48)
  • Overview: Generic Lists (01:07)
  • Using an ArrayList (04:39)
  • Using a Generic List (01:15)
  • Sort with List Class (02:21)
  • Summary (01:03)

Module 11

Handling Exceptions (32:17)
  • Introduction (00:48)
  • Overview: Exception Handling (02:56)
  • Default Error Handling (00:19)
  • No Error Handling (01:02)
  • Error the User Sees (04:08)
  • Simple Try/Catch Block (04:07)
  • Unhandled Exceptions (01:28)
  • Using an Exception Object (01:29)
  • Error Bubbling (02:09)
  • Demo: Using Exception Object (03:08)
  • Demo: Display Cust. Msg. (00:48)
  • Catching Specific Exceptions (00:59)
  • Ordering Catch Blocks (01:21)
  • Trap Multiple Exceptions (00:21)
  • Code: Multiple Exceptions (01:58)
  • View Exception Handling Docs (04:06)
  • Summary (01:03)
Creating / Throwing Exceptions (17:22)
  • Introduction (00:36)
  • Exception Handling Options (00:44)
  • Using the Throw Keyword (00:45)
  • Throwing Exceptions (00:31)
  • Demo: Throwing Exceptions (01:31)
  • InnerException Property (02:10)
  • Running Code Unconditionally (01:16)
  • Finally Block and/or Catch (00:46)
  • Finally Block (03:07)
  • Using Statement (01:11)
  • Creating an Exception Class (00:39)
  • User Defined Exception Handler (02:53)
  • Summary (01:07)

Module 12

Generic List (33:08)
  • Introduction (00:45)
  • Considering Data Structures (02:38)
  • Generic Collection Interfaces (01:03)
  • IEnumerable (00:41)
  • ICollection (00:52)
  • IList (00:41)
  • IDictionary (00:57)
  • Why Think About Interfaces? (01:06)
  • Interfaces Syntax (02:09)
  • Generic List Class (00:52)
  • List Behavior (03:05)
  • List Class Methods (02:46)
  • Demo: Generic List Class (08:28)
  • Return the List (02:12)
  • Demo: Return a List (04:17)
  • Summary (00:30)
List Sorting (26:02)
  • Introduction (00:51)
  • Sorting the List (00:54)
  • Demo: Sort a List (04:02)
  • Look for Items in a List (01:24)
  • Demo: Look for Items in List (04:49)
  • Working with Predicates (02:49)
  • Predicates and Delegates (01:00)
  • List Methods using Predicates (00:55)
  • Test Predicates (05:22)
  • System.Action Predicates (01:20)
  • Converter Predicate (01:49)
  • Summary (00:39)
Other Collections (36:55)
  • Introduction (00:39)
  • Dictionaries Stacks Queues (01:32)
  • Dictionary Class (04:36)
  • Demo: Dictionary Class (05:15)
  • SortedDictionary SortedList (01:38)
  • Demo: SortedDictionary (05:20)
  • Using Queues and Stacks (02:01)
  • Stack (02:26)
  • Queue (01:24)
  • Creating Collection Classes (03:29)
  • Create Custom Collection (07:48)
  • Summary (00:41)

Module 13

Language Extensions (15:03)
  • Introduction (00:28)
  • LINQ and Languages (00:43)
  • The Sample Application (00:48)
  • Demo: Without New Features (04:11)
  • Implict Type Delcarations (00:31)
  • Demo: With New Features (03:06)
  • Object Initializers (00:36)
  • Constructors to the Rescue (00:45)
  • Demo: Object Initializers (03:07)
  • Summary (00:43)
Lambda Expressions (43:29)
  • Introduction (00:33)
  • Lambda Overview (01:14)
  • Using Delegates (01:08)
  • Demo: Delegates (03:03)
  • Predicate Delegate Type (01:18)
  • Demo: Predicate Delegate (03:43)
  • Using Lambda Expressions (01:13)
  • Demo: Lambda Expressions (05:20)
  • Lambda and Delegates (00:56)
  • Lambda and Sorting (00:47)
  • Func Delegate Type (00:46)
  • Demo: Func Declaration (03:39)
  • Extension Methods (00:55)
  • Creating Extension Methods (01:01)
  • Demo: Extension Method (05:03)
  • Chaining Operations (00:56)
  • Demo: Chaining Operations (04:20)
  • Extension vs. Built-In Methods (01:21)
  • Anonymous Types (00:31)
  • Demo: Anonymous Types (04:40)
  • Summary (00:52)