Learn your way! Get started

Learning to Program Using Visual Basic 2008

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 11/5/2008
Level Beginner
Runtime 17h 21m
Closed captioning N/A
Transcript N/A
eBooks / courseware Included
Hands-on labs Included
Sample code Included
Exams Included
Platform Internet Explorer Only


Enterprise Solutions

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



Course description

In this course, you will learn to use Visual Studio 2008 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 added to the .NET Framework 3.5, 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 2008 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 (38:17)
  • Introduction (02:04)
  • Overview of .NET (03:20)
  • Why Use .NET (01:03)
  • Advantages of .NET (04:52)
  • Common Language Runtime (01:14)
  • Running Code and the CLR (00:47)
  • 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:32)
  • First VB App in Notepad (02:16)
  • Examine the Code in the App (04:20)
  • Manifest of the App (03:25)
  • Summary (00:54)
Introduction to Visual Studio (23:43)
  • 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:48)
  • View Object Browser (01:17)
  • Add Code to the Application (00:11)
  • Adding Imports statements (01:44)
  • Module Keyword Explained (01:05)
  • Adding Comments (00:25)
  • Using IntelliSense (02:18)
  • Build and Run the Application (01:21)
  • Summary (00:42)
Debugging (18:43)
  • Introduction (00:52)
  • Overview (00:48)
  • Create a Sample (05:07)
  • Run the Sample (00:32)
  • Syntax Error (01:05)
  • View Error List Window (00:49)
  • Breakpoints (00:58)
  • Autos / Immediate Window (00:31)
  • Single Step Through Code (02:06)
  • Clear All Breakpoints (00:26)
  • Runtime Error (00:20)
  • Try/Catch Block (01:28)
  • Investigating Exceptions (01:33)
  • Logic Error (01:08)
  • Summary (00:54)

Module 2

Intro to Variables / Data Types (43:55)
  • Introduction (00:58)
  • Overview: Variables (07:01)
  • Create / Use Variables / Scope (02:47)
  • Overview: Data Types (01:34)
  • DT: Integer (04:04)
  • Overview: DT Fields/Methods (01:00)
  • DT: Floating-point (00:48)
  • DT: Decimal (01:23)
  • Floating-point Data Type (01:15)
  • Convert to Strings (01:46)
  • Decimal Data Type (05:20)
  • DT: Char / String (02:31)
  • 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:17)
  • Object Data Type (02:01)
  • Summary (00:52)
Variables / Data Types (48:00)
  • Introduction (00:57)
  • Converting Data Types (03:28)
  • Value vs Reference Types (03:23)
  • 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:36)
  • Constants / Enumerations (02:51)
  • 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:33)
  • 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 (03:06)
  • Working with XML (03:30)
  • Write XML (04:40)
  • Read XML (04:47)
  • File Input / Output (00:18)
  • 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:33)
  • Summary (00:30)
Strings and Dates (48:29)
  • Introduction (01:12)
  • Overview: Strings (01:47)
  • 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:19)
  • Stringbuilder Class (03:44)
  • DateTime / TimeSpan (03:03)
  • DateTime Properties (02:46)
  • DateTime Methods (02:04)
  • TimeSpan Properties (03:25)
  • Summary (00:43)

Module 4

The My Namespace (16:02)
  • 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:51)
  • Demo: MyUser (01:31)
  • Summary (00:48)
Branching (33:07)
  • Introduction (00:43)
  • Branching in Code (00:22)
  • Conditional Branching (00:52)
  • If Statements (00:26)
  • Simple If statements (04:07)
  • TryParse Method (01:58)
  • Nested If Statement (01:10)
  • Test for Multiple Conditions (03:41)
  • 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:26)
  • Summary (00:26)
Looping (26:47)
  • Introduction (00:51)
  • For Loops (01:36)
  • Using For Loops (05:39)
  • Use Loops with .NET (00:33)
  • List Drives w/For Loop (02:24)
  • For Each Loop (00:25)
  • List Drives w/For Each Loop (01:21)
  • Compare For and For Each (02:13)
  • Unconditional Branching (01:11)
  • Using the Exit Statement (00:29)
  • Using Goto (01:24)
  • Exiting a For Loop (02:03)
  • The Goto Statement (00:58)
  • The Continue Statement (00:16)
  • Demo: Continue Statement (04:31)
  • Summary (00:46)

Module 5

Introduction to Classes (53:45)
  • Introduction (01:03)
  • Revisit .NET FW Classes (02:39)
  • View Help Documentation (02:06)
  • Classes as Templates (01:25)
  • Class Constructors (02:21)
  • 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 (05:29)
  • Object Test Bench (02:57)
  • Summary (00:57)
Working with Classes (42:44)
  • Introduction (01:02)
  • Specific Issues with Classes (00:37)
  • Value vs Reference Types (01:13)
  • Initial Values (01:38)
  • Working with Null References (02:28)
  • Intro to Garbage Collector (02:06)
  • Releasing Memory (02:11)
  • Overriding Finalize (04:56)
  • Deterministic Finalization (02:30)
  • Demo: Deterministic Final. (06:24)
  • Override Object Class Func. (00:46)
  • ToString Method (02:27)
  • Manipulating Object Ref. (01:11)
  • Copy Ref. vs Copy Value (02:41)
  • Instance vs Shared Members (01:22)
  • Instance/Shared Members (05:12)
  • Modules and Classes (03:05)
  • Summary (00:45)

Module 6

Properties (21:55)
  • 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:39)
  • Summary (01:17)
Methods (34:03)
  • Introduction (00:45)
  • Overview (02:01)
  • Passing Arguments to Methods (01:02)
  • Passing Arguments (03:22)
  • Class Constructors (01:00)
  • Constructors (10:04)
  • Saving / Retrieving Information (01:23)
  • Demo: Saving Information (05:27)
  • Demo: Retrieving Information (07:05)
  • Summary (01:49)
Advanced Methods (29:51)
  • 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:28)
  • Summary (01:21)

Module 7

Inheritance (54:12)
  • Introduction (01:28)
  • Overview (04:57)
  • 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:26)
  • Demo: Overloading DM (02:52)
  • Demo: Calling BC Members (04:48)
  • Abstract Classes and Members (02:51)
  • Sealed Classes and Members (01:00)
  • Abstract Classes (06:08)
  • Sealed Classes (03:20)
  • 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)

Module 8

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:36)
  • Summary (00:18)
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:43)
  • 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 (33:06)
  • Introduction (00:44)
  • Manipulating Arrays (01:35)
  • Sorting Arrays (01:41)
  • Sorting with IComparable (05:33)
  • More Flexible Sorting (04:42)
  • A Smarter IComparer (03:20)
  • Making it Easier (00:53)
  • Avoiding IComparer (03:12)
  • Summarizing Sorting Options (01:05)
  • Searching in Arrays (03:38)
  • Searching Arrays (03:20)
  • FindAll (02:10)
  • Summary (01:07)

Module 9

Motivating Delegates (20:52)
  • 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:23)
  • Summary (01:20)
Introducing Delegates (21:49)
  • Introduction (01:03)
  • Introducing Delegates (02:59)
  • Declare / Invoke Delegate (03:31)
  • Instance Delegate (01:41)
  • Shared Delegate (02:57)
  • Digging Deeper into Delegates (00:51)
  • Delegates with ILDASM (02:04)
  • Delegate v. MulticastDelegate (01:30)
  • Multicast Delegate (03:32)
  • Summary (01:37)
Events (34:29)
  • Introduction (00:54)
  • Working with Events (02:13)
  • Events Like in VB6 (00:32)
  • Demo: Raising Events (03:44)
  • Multiple Handlers (02:57)
  • Events with ILDASM (03:44)
  • Exceptions and Multiple Events (01:38)
  • Demo: Raising Events (03:24)
  • Manually Raising Events (04:46)
  • .NET Event Design Pattern (06:28)
  • Add/Remove Handlers Dynam. (03:35)
  • Summary (00:30)
Introducing Generics (18:39)
  • Introduction (00:33)
  • Overview: Generics (01:12)
  • Generic Methods (01:03)
  • Generic Classes (00:42)
  • Demo: Swapping Values (03:46)
  • Demo: Generic Methods (04:14)
  • Demo: Generic Classes (05:39)
  • Summary (01:26)

Module 10

Generics and Arrays (29:19)
  • Introduction (00:48)
  • Overview (00:27)
  • Sorting Arrays (01:17)
  • Sort with IComparer (00:35)
  • Demo: Sorting Arrays (03:57)
  • Demo: Sort with IComparer (05:14)
  • Sorting with Generic Comp. (01:15)
  • Search w/ Generic Predicates (01:15)
  • Demo: Sorting w/GC (06:43)
  • Demo: Searching in Arrays (01:07)
  • Demo: Searching w/GP (06:09)
  • Summary (00:27)
Generic Interfaces/Constraints (18:13)
  • 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:08)
  • 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:22)
  • Summary (01:03)
Handling Exceptions (32:46)
  • Introduction (00:48)
  • Overview: Exception Handling (03:15)
  • Default Error Handling (01:03)
  • No Error Handling (02:31)
  • Error the User Sees (02:02)
  • Simple Try/Catch Block (04:06)
  • Unhandled Exceptions (01:28)
  • Using an Exception Object (01:30)
  • Error Bubbling (02:03)
  • Demo: Using Exception Object (03:14)
  • Demo: Display Cust. Msg. (00:46)
  • Catching Specific Exceptions (01:00)
  • Ordering Catch Blocks (01:26)
  • Trap Multiple Exceptions (00:13)
  • Code: Multiple Exceptions (02:01)
  • View Exception Handling Docs (04:09)
  • Summary (01:03)
Creating / Throwing Exceptions (17:24)
  • 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:55)
  • Summary (01:07)

Module 11

Generic List (33:24)
  • Introduction (00:45)
  • Considering Data Structures (02:38)
  • Generic Collection Interfaces (01:02)
  • IEnumerable (00:42)
  • ICollection (00:52)
  • IList (00:40)
  • IDictionary (00:58)
  • Why Think About Interfaces? (01:05)
  • Interfaces Syntax (02:10)
  • Generic List Class (00:52)
  • List Behavior (03:05)
  • List Class Methods (02:46)
  • Demo: Generic List Class (08:42)
  • Return the List (02:13)
  • Demo: Return a List (04:17)
  • Summary (00:30)
List Sorting (26:12)
  • 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:59)
  • 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:30)
  • Queue (01:20)
  • Creating Collection Classes (03:29)
  • Create Custom Collection (07:49)
  • Summary (00:41)

Module 12

Language Extensions (15:22)
  • Introduction (00:44)
  • 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:09)
  • Summary (00:43)
Lambda Expressions (43:33)
  • Introduction (00:33)
  • Lambda Overview (01:13)
  • Using Delegates (01:08)
  • Demo: Delegates (03:07)
  • Predicate Delegate Type (01:14)
  • Demo: Predicate Delegate (03:47)
  • Using Lambda Expressions (01:10)
  • Demo: Lambda Expressions (05:23)
  • Lambda and Delegates (00:55)
  • Lambda and Sorting (00:44)
  • Func Delegate Type (00:46)
  • Demo: Func Declaration (03:42)
  • Extension Methods (00:55)
  • Creating Extension Methods (01:01)
  • Demo: Extension Method (05:03)
  • Chaining Operations (00:57)
  • Demo: Chaining Operations (04:19)
  • Extension vs. Built-In Methods (01:21)
  • Anonymous Types (00:31)
  • Demo: Anonymous Types (04:41)
  • Summary (00:52)