Learn your way! Get started

Learning to Program Using Visual C# 2005

with experts Ken Getz, Robert Green


Course at a glance

Included in these subscriptions:

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

Release date Release date 8/15/2006
Level Level Beginner
Runtime Runtime 15h 49m
Closed captioning Closed captioning N/A
Transcript Transcript N/A
eBooks / courseware eBooks / courseware Included
Hands-on labs Hands-on labs Included
Sample code Sample code Included
Exams Exams Included
Platform Platform Internet Explorer Only


Enterprise Solutions
Enterprise Solutions

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



Course description

In this course, you’ll learn to use Visual Studio 2005 to explore the Visual C# 2005 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’ll 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’ll learn about data types, variables, and operators, along with all the important flow control structures. You’ll 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. By the end of this course, you will understand the important basic concepts that will allow you to start creating the applications you need.

Meet the experts

Ken Getz 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 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 (41:22)
  • 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:54)
  • First C# App in Notepad (04:26)
  • Examine the Code in the App (05:08)
  • Manifest of the App (03:10)
  • Summary (00:54)
Introduction to Visual Studio (24:38)
  • Introduction (00:30)
  • Working with Profile Settings (00:52)
  • Explore Profile Settings (02:39)
  • Create a New Project (00:08)
  • Set Save Project Location (02:31)
  • Windows in Visual Studio (01:06)
  • Pin / Unpin Windows (00:39)
  • Reset Window Layout (00:24)
  • Work with Files in the Project (01:20)
  • Set Project Properties (02:20)
  • Refactoring Namespaces (01:18)
  • Add a Reference (01:05)
  • View Object Browser (01:33)
  • Add Code to the Application (01:07)
  • using Keyword (00:24)
  • class Keyword (00:42)
  • Adding Comments (00:24)
  • Using IntelliSense (03:02)
  • Build and Run the Application (01:41)
  • Summary (00:42)
Debugging (16:45)
  • Introduction (00:52)
  • Overview (00:11)
  • Create a Sample (03:38)
  • Run the Sample (00:06)
  • Syntax Error (01:30)
  • View Error List Window (00:55)
  • Adding Breakpoints (00:49)
  • Autos/Immediate Window (00:20)
  • Single Step Through Code (01:29)
  • Clear All Breakpoints (00:25)
  • Runtime Error (00:12)
  • Try / Catch Block (03:15)
  • Investigating Exceptions (00:52)
  • Logic Error (01:11)
  • Summary (00:54)

Module 2

Intro to Variables / Data Types (44:43)
  • Introduction (00:58)
  • Overview: Variables (05:31)
  • Create / Use Variables / Scope (04:35)
  • Overview: Data Types (01:35)
  • DT: Integer (03:29)
  • Overview: DT Fields/Methods (01:00)
  • DT: Floating-point (01:00)
  • DT: Decimal (01:16)
  • Floating-point Data Type (01:08)
  • Convert to Strings (01:57)
  • Decimal Data Type (06:05)
  • DT: Char / String (03:05)
  • DT: Bool / Object (02:03)
  • Char Data Type (02:34)
  • String Data Type (04:29)
  • Bool Data Type (00:56)
  • Object Data Type (02:03)
  • Summary (00:52)
Variables / Data Types (43:09)
  • Introduction (00:57)
  • Converting Data Types (03:29)
  • Value vs Reference Types (03:23)
  • Converting Data Types (02:03)
  • Using Conversion Functions (04:39)
  • Using ConvertClass (01:41)
  • Using Parse (01:54)
  • Value / Reference Types (02:34)
  • Const. / Enum. / Structs (01:36)
  • Constants/Enumerations (01:48)
  • Structs (02:42)
  • Operators (04:11)
  • Arithmetic / String Operators (02:16)
  • Comparison/Logical Operators (05:02)
  • Type Operators (00:52)
  • Operator Precedence (03:36)
  • Summary (00:17)

Module 3

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

Module 4

Branching (28:46)
  • Introduction (00:43)
  • Branching in Code (00:22)
  • Conditional Branching (00:50)
  • If Statements (00:28)
  • Simple If Statements (03:36)
  • TryParse Method (01:21)
  • Nested If Statement (01:46)
  • Test for Multiple Conditions (03:46)
  • Test for a Single Condition (00:28)
  • The switch Statement (00:26)
  • Demo: switch Statements (08:06)
  • Repeating Code Blocks (00:31)
  • Unbounded Looping (00:11)
  • While Loop (00:30)
  • Do...while Loop (00:37)
  • Using While Loops (03:30)
  • Demo: Using Do...While Loop (01:02)
  • Summary (00:26)
Looping (24:49)
  • Introduction (00:51)
  • For Loops (01:36)
  • Using For Loops (06:26)
  • Use Loops with .NET (00:33)
  • List Drives w/For Loop (02:33)
  • For Each Loop (00:25)
  • List Drives w/For Each Loop (01:28)
  • Compare For and For Each (02:13)
  • Unconditional Branching (00:31)
  • The break Statement (00:22)
  • Using the break Statement (00:38)
  • Using Goto (01:47)
  • Exiting a For Loop (01:34)
  • The Goto Statement (00:58)
  • The Continue Statement (00:16)
  • Demo: Continue Statement (01:46)
  • Summary (00:46)
Introduction to Classes (52:52)
  • Introduction (01:03)
  • Revisit .NET FW Classes (02:50)
  • View Help Documentation (02:02)
  • Classes as Templates (01:25)
  • Class Constructors (02:46)
  • Shared vs Instance (00:29)
  • Different Types of Members (01:15)
  • Which is Shared or Instance (01:46)
  • Creating Your Own Classes (00:43)
  • Objects as Things (00:45)
  • Creating Your First Class (02:48)
  • this Keyword Explained (03:05)
  • Adding XML Comments (00:43)
  • Add an Overloaded Method (02:56)
  • Using the Class View Window (01:17)
  • Using the Class Designer (02:00)
  • Create w/ Class Designer (05:41)
  • Investigate the Created Class (00:49)
  • Add Code to Finish the Class (07:05)
  • Test the Class (06:29)
  • Object Test Bench (03:46)
  • Summary (00:57)

Module 5

Working with Classes (39:29)
  • Introduction (01:02)
  • Specific Issues with Classes (00:37)
  • Value vs Reference Types (01:13)
  • Initial Values (00:40)
  • Working with Null References (02:24)
  • Intro to Garbage Collector (02:06)
  • Releasing Memory (02:02)
  • Overriding Finalize (05:21)
  • Deterministic Finalization (02:31)
  • Demo: Deterministic Final. (07:40)
  • Override Object Class Func. (00:46)
  • ToString Method (02:34)
  • Manipulating Object Ref. (01:11)
  • Copy Ref. vs Copy Value (02:20)
  • Instance vs Static Members (01:33)
  • Instance/Static Members (03:26)
  • Static Property (01:09)
  • Summary (00:45)
Properties (13:50)
  • Introduction (00:55)
  • Overview (02:10)
  • Calculate Property Values (00:38)
  • Validate Property Values (00:51)
  • Demo: Read/Write Properties (01:50)
  • Demo: Calculated Property (03:16)
  • Demo: Validate a Property (02:49)
  • Summary (01:17)
Methods (35:45)
  • Introduction (00:45)
  • Overview (02:01)
  • Passing Arguments to Methods (01:02)
  • Passing Parameters (03:25)
  • Using an Out Parameter (02:54)
  • Class Constructors (01:00)
  • Constructors (09:46)
  • Saving / Retrieving Information (01:28)
  • Demo: Saving Information (04:54)
  • Demo: Retrieving Information (06:36)
  • Summary (01:49)
Advanced Methods (19:52)
  • Introduction (00:29)
  • Returning / Passing Arrays (01:25)
  • Returning an Array (02:31)
  • Pass Parameters Array (05:32)
  • Static vs Instance Members (02:19)
  • Using Static Variables (01:53)
  • Using a Static Field (02:57)
  • Using a Static Method (01:22)
  • Summary (01:21)

Module 6

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

Module 7

Introduction to Arrays (30:16)
  • Introduction (01:04)
  • Working with Arrays (01:45)
  • One Variable vs Many (00:45)
  • Array Sample (03:13)
  • Visualizing Arrays (00:57)
  • Arrays Under the Covers (00:42)
  • Create and Fill Arrays (00:45)
  • Resize Arrays (01:32)
  • Assign References to Arrays (01:18)
  • Cloning an Array (00:58)
  • Arrays of Objects (03:15)
  • Multi-Dimensional Arrays (01:53)
  • Retrieving Data From an Array (03:21)
  • Pass an Array as a Parameter (01:23)
  • Arrays and Method Parameters (00:59)
  • Work with Method Parameters (01:55)
  • Auto-Array Parameter Rules (00:38)
  • Arrays in the .NET Framework (00:38)
  • String.Split (00:43)
  • Process.GetProcesses (00:59)
  • Summary (01:23)
Manipulating Arrays (48:42)
  • Introduction (00:44)
  • Manipulating Arrays (01:35)
  • Sorting Arrays (01:35)
  • Sorting with IComparable (04:58)
  • More Flexible Sorting (05:04)
  • A Smarter IComparer (03:31)
  • Making it Easier (00:53)
  • Avoiding IComparer (03:14)
  • Summarizing Sorting Options (01:05)
  • Searching in Arrays (03:38)
  • Searching Arrays (03:18)
  • FindAll (01:56)
  • Creating Indexers (01:40)
  • Add an Enumerator (01:19)
  • Indexers / Enumerators (10:24)
  • GetEnumerator and Yield (02:34)
  • Summary (01:07)
Motivating Delegates (20:19)
  • Introduction (00:43)
  • Motivating Delegates (01:03)
  • Demo: FileSearch0 (03:30)
  • FileSearch1 (00:58)
  • Demo: FileSearch1 (01:23)
  • Inherit and Override (01:31)
  • Event Interface Class (00:54)
  • IFileFound Handler (04:31)
  • Adding Multiple Handlers (01:14)
  • Multiple Handlers (01:26)
  • Multiple Listeners (01:40)
  • Summary (01:20)

Module 8

Introducing Delegates (23:30)
  • Introduction (01:03)
  • Introducing Delegates (01:27)
  • Using Delegates (01:31)
  • Declare / Invoke Delegate (03:38)
  • Instance Delegate (01:58)
  • Instance vs Static (01:20)
  • Digging Deeper into Delegates (00:50)
  • Delegates with ILDASM (02:01)
  • Named vs Anon. Delegates (00:39)
  • Anonymous Delegates (03:32)
  • Delegate vs MulticastDelegate (01:28)
  • Multicast Delegate (02:18)
  • Summary (01:37)
Events (31:39)
  • Introduction (00:54)
  • Working with Events (02:13)
  • Raising Events (02:37)
  • Add / Remove Event Handlers (00:53)
  • Demo: Raise Event (07:04)
  • Multiple Handlers (03:15)
  • Exceptions & Event Handlers (04:09)
  • GetInvocationList (04:35)
  • .NET Event Design Pattern (05:25)
  • Summary (00:30)
Introducing Generics (17:24)
  • Introduction (00:33)
  • Overview: Generics (01:12)
  • Generic Methods (01:03)
  • Generic Classes (00:42)
  • Demo: Swapping Values (03:44)
  • Demo: Generic Methods (03:20)
  • Demo: Generic Classes (05:21)
  • Summary (01:26)
Generics and Arrays (26:45)
  • Introduction (00:48)
  • Overview (00:27)
  • Sorting Arrays (01:17)
  • Sort with IComparer (04:05)
  • Demo: Sort with IComparer (04:11)
  • Sorting with Generic Comp. (01:15)
  • Searching w/ GP (01:16)
  • Demo: Sorting w/ GC (06:25)
  • Demo: Searching in Arrays (01:10)
  • Demo: Searching w/ GP (05:19)
  • Summary (00:27)

Module 9

Generic Interfaces/Constraints (17:50)
  • Introduction (00:39)
  • Overview: Generic Interfaces (00:54)
  • Generic Constraints (00:29)
  • Generic Sorting Arrays (05:12)
  • Generic Sort with IComparer (02:54)
  • Generic Comparison (01:34)
  • Generic Compare Method (05:19)
  • Summary (00:45)
Generic Lists (13:27)
  • Introduction (00:48)
  • Overview: Generic Lists (01:08)
  • Using an ArrayList (05:27)
  • Using a Generic List (02:24)
  • Sort with List Class (02:35)
  • Summary (01:03)
Handling Exceptions (31:34)
  • Introduction (00:48)
  • Overview: Exception Handling (03:15)
  • Default Error Handling (01:03)
  • No Error Handling (02:07)
  • Error the User Sees (01:43)
  • Simple Try/Catch Block (03:33)
  • Unhandled Exceptions (01:20)
  • Using an Exception Object (01:30)
  • Error Bubbling (02:36)
  • Demo: Using Exception Object (04:15)
  • Demo: Display Cust. Msg. (00:41)
  • Catching Specific Exceptions (00:59)
  • Ordering Catch Blocks (01:22)
  • Trap Multiple Exceptions (01:33)
  • Code: Multiple Exceptions (01:17)
  • View Exception Handling Docs (02:21)
  • Summary (01:03)
Creating/Throwing Exceptions (17:29)
  • Introduction (00:36)
  • Exception Handling Options (00:44)
  • Using the Throw Keyword (00:45)
  • Throwing Exceptions (00:31)
  • Demo: Throwing Exceptions (01:56)
  • InnerException Property (02:21)
  • Running Code Unconditionally (01:15)
  • Finally Block and/or Catch (00:44)
  • Finally Block (02:28)
  • Using Statement (01:06)
  • Creating an Exception Class (00:38)
  • User Defined Exception (03:13)
  • Summary (01:07)

Module 10

Generic List (34:00)
  • Introduction (00:45)
  • Considering Data Structures (02:38)
  • Generic Collection Interfaces (01:02)
  • IEnumerable (00:42)
  • ICollection (00:51)
  • IList (00:40)
  • IDictionary (00:58)
  • Why Think About Interfaces? (01:05)
  • Interfaces Syntax (02:26)
  • Generic List Class (00:51)
  • List Behavior (03:05)
  • List Class Methods (02:46)
  • Demo: Generic List Class (09:08)
  • Return the List (02:14)
  • Demo: Return the List (04:13)
  • Summary (00:30)
List Sorting (26:28)
  • Introduction (00:51)
  • Sorting the List (00:54)
  • Demo: Sort a List (03:20)
  • Look for Items in a List (01:25)
  • Demo: Look for Items in List (05:01)
  • Working with Predicates (02:49)
  • Predicates and Delegates (00:59)
  • List Methods using Predicates (00:55)
  • Test Predicates (05:42)
  • System.Action Predicates (01:26)
  • Converter Predicate (02:20)
  • Summary (00:39)
Other Collections (36:48)
  • Introduction (00:39)
  • Dictionaries Stacks Queues (01:32)
  • Dictionary Class (04:36)
  • Demo: Dictionary Class (04:48)
  • SortedDictionary SortedList (01:36)
  • Demo: SortedDictionary (06:18)
  • Using Queues and Stacks (02:01)
  • Stack (02:02)
  • Queue (01:10)
  • Creating Class Collections (02:44)
  • Create Class Collection (08:13)
  • Summary (01:02)