Learning to Program Using Visual C# 2010
Interactive

Learning to Program Using Visual C# 2010

LearnNow Online
Updated Aug 23, 2018

Course description

In this course, you will learn to use Visual Studio 2010 to explore the Visual C# 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.

Each LearnNowOnline training course is made up of Modules (typically an hour in length). Within each module there are Topics (typically 15-30 minutes each) and Subtopics (typically 2-5 minutes each). There is a Post Exam for each Module that must be passed with a score of 70% or higher to successfully and fully complete the course.


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

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.

Video Runtime

986 Minutes

Time to complete

3711 Minutes

Course Outline

Module 1

Introduction to .NET (39:26)

  • Introduction (02:03)
  • Overview of .NET (02:06)
  • Why Use .NET (01:03)
  • Advantages of .NET (04:44)
  • Common Language Runtime (01:14)
  • Running Code and the CLR (00:47)
  • CLR and Compilers (00:46)
  • Just-in-Time Compiler (JIT) (01:55)
  • 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)
  • Demo: Use Command Line Compiler (01:52)
  • Demo: First C# App in Notepad (09:17)
  • Demo: Manifest of the App (02:57)
  • Summary (00:54)

Introduction to Visual Studio (24:01)

  • 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 (00:47)
  • Pin / Unpin Windows (00:33)
  • Reset Window Layout (00:22)
  • Work with Files in the Project (01:19)
  • Set Project Properties (02:22)
  • Refactoring Namespaces (01:31)
  • Add a Reference (00:45)
  • View Object Browser (01:34)
  • Add Code to the Application (01:07)
  • using Keyword (00:13)
  • class Keyword (00:42)
  • Adding Comments (00:39)
  • Using IntelliSense (02:56)
  • Build and Run the Application (01:42)
  • Summary (00:39)

Debugging (16:38)

  • Introduction (00:52)
  • Overview (00:49)
  • Create a Sample (03:00)
  • Run the Sample (00:36)
  • Syntax Error (00:34)
  • View Error List Window (01:20)
  • Adding Breakpoints (00:49)
  • View Autos / Immediate Window (00:14)
  • Single Step Through Code (01:40)
  • Clear All Breakpoints (00:20)
  • Runtime Error (00:12)
  • Try / Catch Block (03:15)
  • Investigating Exceptions (00:52)
  • Logic Error (01:04)
  • 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)
  • Data Type: Integer (03:28)
  • Overview: DT Fields/Methods (01:00)
  • Data Type: Floating-point (01:00)
  • Data Type: Decimal (01:16)
  • Floating-point Data Type (01:08)
  • Convert to Strings (01:57)
  • Decimal Data Type (06:05)
  • Data Type: Char / String (03:06)
  • Data Type: Bool / Object (02:02)
  • 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 (42:50)

  • Introduction (00:57)
  • Converting Data Types (03:30)
  • 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 (04:44)
  • Type Operators (01:10)
  • Operator Precedence (03:18)
  • Summary (00:17)
Module 3

.NET Framework Classes (38:22)

  • 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 (03:44)
  • Working with XML (03:26)
  • Read / Write XML (07:55)
  • File Input / Output (00:18)
  • Write to / Read from Files (00:21)
  • Managing Files (01:27)
  • Managing Directories (00:37)
  • Retrieve Drive Info (01:04)
  • StreamWriter/StreamReader (02:16)
  • FileInfo Class (05:00)
  • DirectoryInfo Class (01:53)
  • DriveInfo Class (01:14)
  • Summary (00:30)

Strings and Dates (48:17)

  • Introduction (01:12)
  • Overview: Strings (00:45)
  • 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 (03:34)
  • Summary (00:43)
Module 4

Branching (28:45)

  • 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:01)
  • Summary (00:26)

Looping (24:31)

  • 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:27)
  • The Goto Statement (00:57)
  • The Continue Statement (00:17)
  • Demo: Continue Statement (01:34)
  • Summary (00:46)
Module 5

Introduction to Classes (47:58)

  • Introduction (01:03)
  • Revisit .NET FW Classes (02:49)
  • View Help Documentation (01:59)
  • Classes as Templates (01:17)
  • Class Constructors (02:52)
  • Shared vs Instance (00:23)
  • Different Types of Members (01:15)
  • Which is Shared or Instance (01:25)
  • Creating Your Own Classes (00:44)
  • Objects as Things (00:43)
  • Creating Your First Class (02:51)
  • this Keyword Explained (03:13)
  • Adding XML Comments (00:33)
  • Add an Overloaded Method (03:22)
  • Using the Class View Window (00:45)
  • Using the Class Designer (01:55)
  • Create w/ Class Designer (06:06)
  • Investigate the Created Class (01:01)
  • Add Code to Finish the Class (07:13)
  • Test the Class (05:23)
  • Summary (00:57)

Working with Classes (38:34)

  • Introduction (01:02)
  • Specific Issues with Classes (00:37)
  • Value vs Reference Types (01:14)
  • Initial Values (00:40)
  • Working with Null References (02:24)
  • Intro to Garbage Collector (02:06)
  • Releasing Memory (02:02)
  • Overriding Finalize (04:27)
  • 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 (01:22)
  • Static Property (03:12)
  • Summary (00:45)
Module 6

Properties (13:42)

  • 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:41)
  • Summary (01:17)

Methods (35:40)

  • 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:23)
  • Demo: Saving Information (04:59)
  • Demo: Retrieving Information (06:31)
  • 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 7

Inheritance (49:16)

  • Introduction (01:28)
  • Overview (04:57)
  • Polymorphism (02:25)
  • 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:41)
  • Overloading Derived Members (00:54)
  • Calling Base Class Members (01:07)
  • Demo: Overriding Members (04:38)
  • Demo: Overloading Members (03:36)
  • Demo: Calling BC Members (05:11)
  • Abstract Classes and Members (02:51)
  • Sealed Classes and Members (01:00)
  • Abstract Classes (05:22)
  • Sealed Classes (00:35)
  • 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:32)

  • 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:46)
  • Summary (00:18)
Module 8

Introduction to Arrays (30:12)

  • Introduction (01:04)
  • Working with Arrays (01:44)
  • One Variable vs Many (00:46)
  • 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:19)
  • Arrays and Method Parameters (00:58)
  • Work with Method Parameters (01:56)
  • Auto-Array Parameter Rules (00:39)
  • Arrays in the .NET Framework (00:36)
  • String.Split (00:46)
  • Process.GetProcesses (00:55)
  • Summary (01:23)

Manipulating Arrays (48:28)

  • Introduction (00:44)
  • Manipulating Arrays (01:36)
  • Sorting Arrays (01:36)
  • Sorting with IComparable (04:57)
  • More Flexible Sorting (05:04)
  • A Smarter IComparer (03:31)
  • Making it Easier (00:43)
  • Avoiding IComparer (03:13)
  • Summarizing Sorting Options (01:05)
  • Searching in Arrays (03:44)
  • Searching Arrays (03:20)
  • FindAll (01:49)
  • Creating Indexers (01:40)
  • Add an Enumerator (01:19)
  • Indexers / Enumerators (10:24)
  • GetEnumerator and Yield (02:29)
  • Summary (01:07)
Module 9

Motivating Delegates (20:02)

  • Introduction (00:43)
  • Motivating Delegates (01:03)
  • Demo: FileSearch0 (03:30)
  • FileSearch1 (00:58)
  • Demo: FileSearch1 (01:23)
  • Inherit and Override (01:27)
  • Event Interface Class (00:54)
  • IFileFound Handler (04:31)
  • Adding Multiple Handlers (01:14)
  • Multiple Handlers (01:21)
  • Multiple Listeners (01:32)
  • Summary (01:20)

Introducing Delegates (23:23)

  • Introduction (01:03)
  • Introducing Delegates (01:26)
  • Using Delegates (01:32)
  • Declare / Invoke Delegate (03:38)
  • Instance Delegate (01:58)
  • Instance vs Static (01:20)
  • Digging Deeper into Delegates (00:50)
  • Delegates with ILDASM (01:54)
  • Named vs Anon. Delegates (00:42)
  • Anonymous Delegates (03:29)
  • Delegate vs MulticastDelegate (01:30)
  • Multicast Delegate (02:18)
  • Summary (01:37)

Events (31:38)

  • Introduction (00:54)
  • Working with Events (02:15)
  • Raising Events (02:36)
  • Add / Remove Event Handlers (00:52)
  • Demo: Raise Event (07:04)
  • Multiple Handlers (03:15)
  • Exceptions & Event Handlers (04:46)
  • GetInvocationList (03:58)
  • .NET Event Design Pattern (05:24)
  • Summary (00:30)
Module 10

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:20)
  • Summary (01:26)

Generics and Arrays (26:31)

  • Introduction (00:48)
  • Overview (00:27)
  • Sorting Arrays (01:17)
  • Sort with IComparer (04:05)
  • Demo: Sort with IComparer (04:07)
  • Sorting with Generic Comp. (01:18)
  • Searching w/ Generic Predicates (01:12)
  • Demo: Sorting w/ GC (06:20)
  • Demo: Searching in Arrays (01:14)
  • Demo: Searching w/ GP (05:11)
  • Summary (00:27)

Generic Interfaces/Constraints (17:44)

  • 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:13)
  • Summary (00:45)

Generic Lists (13:26)

  • Introduction (00:48)
  • Overview: Generic Lists (01:08)
  • Using an ArrayList (05:27)
  • Using a Generic List (02:24)
  • Sort with List Class (02:34)
  • Summary (01:03)
Module 11

Handling Exceptions (31:03)

  • 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 (00:54)
  • 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:16)
  • View Exception Handling Docs (02:17)
  • Summary (01:03)

Creating and Throwing Exceptions (17:28)

  • 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:46)
  • Finally Block (02:26)
  • Using Statement (01:06)
  • Creating an Exception Class (00:38)
  • User Defined Exception (03:12)
  • Summary (01:07)
Module 12

Generic List (33:52)

  • Introduction (00:45)
  • Considering Data Structures (02:38)
  • Generic Collection Interfaces (01:03)
  • IEnumerable (00:41)
  • ICollection (00:51)
  • IList (00:41)
  • IDictionary (00:57)
  • Why Think About Interfaces? (01:06)
  • Interfaces Syntax (02:25)
  • Generic List Class (00:52)
  • List Behavior (03:05)
  • List Class Methods (02:45)
  • Demo: Generic List Class (09:00)
  • Return the List (02:13)
  • Demo: Return the List (04:12)
  • Summary (00:30)

List Sorting (26:07)

  • Introduction (00:51)
  • Sorting the List (00:54)
  • Demo: Sort a List (03:14)
  • Look for Items in a List (01:25)
  • Demo: Look for Items in List (05:01)
  • Working with Predicates (02:49)
  • Predicates and Delegates (01:00)
  • List Methods using Predicates (00:55)
  • Test Predicates (05:42)
  • System.Action Predicates (01:26)
  • Converter Predicate (02:05)
  • Summary (00:39)

Other Collections (36:27)

  • Introduction (00:39)
  • Dictionaries Stacks Queues (01:33)
  • 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 (00:41)
Module 13

Language Extensions (12:57)

  • Introduction (00:28)
  • LINQ and Languages (00:43)
  • The Sample Application (00:48)
  • Demo: Without New Features (03:02)
  • Implicit Type Delcarations (00:32)
  • Demo: With New Features (02:29)
  • Object Initializers (00:30)
  • Constructors to the Rescue (00:54)
  • Demo: Object Initializers (02:43)
  • Summary (00:43)

Lambda Expressions (42:04)

  • Introduction (00:33)
  • Lambda Overview (01:14)
  • Using Delegates (01:07)
  • Demo: Delegates (03:09)
  • Predicate Delegate Type (01:09)
  • Demo: Predicate Delegate (02:07)
  • Using Anonymous Methods (00:38)
  • Anonymous Methods (00:47)
  • Demo: Anonymous Methods (01:58)
  • Using Lambda Expressions (01:10)
  • Demo: Lambda Expressions (06:21)
  • Lambda and Delegates (00:55)
  • Lambda and Sorting (00:44)
  • Func Delegate Type (00:48)
  • Demo: Func Declaration (03:05)
  • Extension Methods (00:56)
  • Creating Extension Methods (01:07)
  • Demo: Extension Method (03:49)
  • Chaining Operations (00:57)
  • Demo: Chaining Operations (04:07)
  • Extension vs. Built-In Methods (01:21)
  • Anonymous Types (00:00)
  • Demo: Anonymous Types (02:58)
  • Summary (00:52)
;