Programming in C# with Microsoft Visual Studio 2010



Learn about the C# program structure, language syntax, and implementation details with .NET Framework 4.0 in this five-day course. You will discover the new enhancements in the C# 4.0 language by using Visual Studio 2010.

After an introduction to C# and the .Net framework, you'll learn how to use C# programming constructs, how to read and write files, how to encapsulate data, and how to use LINQ to query data. Fourteen Global Knowledge exclusive hands-on labs help you put theory into practice and better prepare you for when you return to your job.


Experienced developers who have programming experience in C, C++, Visual Basic, or Java and understand the concepts of object-oriented programming


  • At least 12 months' experience working with an object-oriented language
  • C++ or Java knowledge, including:
    • Creating classes
    • Inheritance and abstraction
    • Polymorphism
    • Interfaces
    • Exceptions
  • Knowledge of the Visual Studio IDE

Learning Objectives

  • Developing C# applications for the Microsoft .NET Framework 4.0
  • Structure of C# 4.0 programs, language syntax, and implementation details
  • Using C# programming constructs
  • Declaring and calling methods
  • Handling exceptions
  • Reading and writing files
  • Creating new types
  • Encapsulating data
  • Inheriting from classes and implementing interfaces
  • Managing the lifetime of objects and controlling resources
  • Defining overload operators
  • Decoupling methods
  • Using collections and building generic types
  • Using LINQ to query data
  • Integrating Visual C# Code with Dynamic Languages and COM Components

1. C# and the .NET Framework

  • Introduction to the .NET Framework
  • Creating Projects within Visual Studio 2010
  • Writing a C# Application
  • Building a Graphical Application
  • Documenting an Application
  • Running and Debugging Applications by Using Visual Studio 2010

2. Using C# Programming Constructs

  • Declaring Variables and Assigning Values
  • Using Expressions and Operators
  • Creating and Using Arrays
  • Using Decision Statements
  • Using Iteration Statements

3. Declaring and Calling Methods

  • Defining and Invoking Methods
  • Specifying Optional Parameters and Output Parameters

4. Exceptions

  • Handling Exceptions
  • Raising Exceptions

5. Reading and Writing Files

  • Accessing the File System
  • Reading and Writing Files by Using Streams

6. Creating New Types

  • Creating and Using Enumerations
  • Creating and Using Classes
  • Creating and Using Structs
  • Comparing References to Values

7. Encapsulating Data and Methods

  • Controlling Visibility of Type Members
  • Sharing Methods and Data

8. Inheriting from Classes and Implementing Interfaces

  • Using Inheritance to Define New Reference Types
  • Defining and Implementing Interfaces
  • Defining Abstract Classes

9. Managing the Lifetime of Objects and Controlling Resources

  • Introduction to Garbage Collection
  • Managing Resources

10. Encapsulating Data and Defining Overloaded Operators

  • Creating and Using Properties
  • Creating and Using Indexers
  • Overloading Operators

11. Decoupling Methods and Handling Events

  • Declaring and Using Delegates
  • Using Lambda Expressions
  • Handling Events

12. Using Collections and Building Generic Types

  • Using Collections
  • Creating and Using Generic Types
  • Defining Generic Interfaces and Understanding Variance
  • Using Generic Methods and Delegates

13. Building and Enumerating Custom Collection Classes

  • Implementing a Custom Collection Class
  • Adding an Enumerator to a Custom Collection Class

14. Using LINQ to Query Data

  • Using the LINQ Extension Methods and Query Operators
  • Building Dynamic LINQ Queries and Expressions

15. Integrating Visual C# Code with Dynamic Languages and COM Components

  • Integrating C# Code with Ruby and Python
  • Accessing COM Components from C#