Course Description

This 2-day intensive C# Programming Essentials training course is designed to help the experienced software developer quickly come up to speed on the C# language. This course concisely covers the foundations of programming using Microsoft’s C# programming language. It starts with a brief chapter, “.NET: What You Need to Know,” which gets the student up and running in the .NET environment with a minimum of fuss.

The next two chapters cover C# language essentials and object-oriented programming in C#, followed by a discussion about how C# relates to the .NET Framework. The course then moves on to cover delegates and events. The course also includes a succinct introduction to creating GUI programs using Windows Forms. The course wraps-up with a chapter covering the new features in C#. Appendices provide a tutorial on Visual Studio as well as an overview of LINQ. The course is practical, with many example programs and a progressively developed case study.


Programming in a high-level language is required and some background in object-oriented programming is recommended.

Who is this Course For?

Software Developers who need to design and develop using C# for the .NET framework.

Further Training

A more in-depth exposure to C# and Microsoft.NET can be gained through attendance at our C# Programming Advanced training course.


Course Content

Getting Started with .NET

Getting Started
.NET: What Is Really Happening
.NET Programming in a Nutshell
Viewing the Assembly
Viewing Intermediate Language
Understanding .NET
Visual Studio
Creating a Console Application
Adding a C# File
Using the Visual Studio Text Editor
Build and Run the Project
Pausing the Output
Visual C# and GUI Programs
.NET Documentation

C# Overview for the Sophisticated Programmer

Hello, World
Compiling, Running (Command Line)
Program Structure
Input in C#
More about Classes
InputWrapper Class
Input Wrapper Implementation
Compiling Multiple Files
Control Structures
C# Operators
Precedence Table
Types in C#
Simple Types
Types in System Namespace
Integer Data Types
Floating Point Data Types
Implicit Conversions
Explicit Conversions
Boolean Data Type
Uninitialized Variables
Enumeration Types
Nullable Types
Reference Types
Class Types
Copying Strings
StringBuilder Class
Classes and Structs
Static and Instance Methods
Method Parameters
No “Freestanding” Functions in C
Classes with All Static Methods
Parameter Passing
Parameter Terminology
Value Parameters
Reference Parameters
Output Parameters
Structure Parameters
Class Parameters
Method Overloading
Variable Length Parameter Lists
One-Dimensional Arrays
Jagged Arrays
Rectangular Arrays
foreach for Arrays
Boxing and Unboxing
Implicitly Typed Variables
Output in C#
Checked Integer Arithmetic
Throwing New Exceptions

Object-Oriented Programming in C#

C# Object-Oriented Features
Encapsulation and Accessors
Asymmetric Accessor Accessibility
Using a Property
Visual Studio Console Projects
Files in Skeleton Solution
Source Files
Account Class
Static Members
Static in Main
Static Constructor
Constant and Readonly Fields
Auto-Implemented Properties
Inheritance in C#
New Version of Base Class
Features of the New Base Class
Derived Class
Overriding a Virtual Function
Abstract Classes
Keyword: abstract
Derived Class
Sealed Classes
Access Control and Assemblies
Internal Accessibility
Class Libraries

C# and the .NET Framework

Components & OO in C#
Interfaces in C#
Interface Inheritance
Programming with Interfaces
Implementing Interfaces
Using an Interface
Dynamic Use of Interfaces
is Operator
Resolving Ambiguity
Explicit Interface Implementation
ArrayList Methods
IEnumerable and IEnumerator
Using Enumerators
Collections of User-Defined Objects
Account Class
AccountList Class
Copy Semantics in C#
Deep Copy and ICloneable
Writing Generic Code
Using a Class of object
Generic Types
Generic Syntax in C#
Generic Client Code
Object Initializers
Collection Initializers
Anonymous Types

Delegates & Events
Callbacks and Delegates
Usage of Delegates
Declaring a Delegate
Defining a Method
Creating a Delegate Object
Calling a Delegate
Random Number Generation
A Random Array
Anonymous Methods
Combining Delegate Objects
Lambda Expressions
Named Method
Anonymous Method
Events in C# and .NET
Client Side Event Code
Introduction to Windows Forms

Creating a Windows Forms App
Partial Classes
Windows Forms Event Handling
Add Events for a Control
Events Documentation
Closing a Form
ListBox Control

New Features in C#

dynamic Type
dynamic versus object
Behavior of object
Behavior of dynamic
Named Arguments
Optional Arguments
Book Class
Using Optional Arguments
Automating Office with C#
Automating Excel
Automating Word
Variance in Generic Interfaces
Variance with IComparer
Interfaces with Variance Support

Appendix A – Using Visual Studio

A Visual Studio Solution
Customizing a Toolbar
Creating a Console Application
Adding a C# File
Using the Visual Studio Text Editor
Build and Run the Bytes Project
Running the Bytes Project
Executable File Location
Managing Configurations
Project Configurations
Creating a New Configuration
Setting Configuration Build Settings
Watch Variables
Debug Toolbar
Stepping with the Debugger
Call Stack and Call Hierarchy
Adding a Reference
Project Dependencies
Startup Project
Hidden Files

Appendix B – Language Integrated Query (LINQ)

Language-Integrated Query (LINQ)
Using IEnumerable
Basic LINQ Query Operators
Obtaining a Data Source
Obtaining Lists and Arrays
Deferred Execution