Choose your language:

France
Germany
Hong Kong
India
Ireland
Japan
Malaysia
Netherlands
New Zealand
Singapore
Sweden
United Kingdom
United States

Introduction to C#

Course Code

IN1614

Duration

5 Days

Previous development experience
This five-day course gives the participant a thorough introduction into the C# language and how to leverage functionality from the .NET Framework in C# applications. This course assumes no prior knowledge of C# or .NET, starting with an orientation to Visual Studio and the .NET platform. The course works through basic data types, operators and control structures as well as defining custom object classes using inheritance, interface implementation and event creation and handling. The course also provides a solid grounding in the latest features of the C# language and the .NET Framework such as string interpolation, Language Integrated Query (LINQ), dynamic data types, asynchronous keywords and more.
This course is designed for developers.

In this course, participants will:

  • Work through basic data types, operators, and control structures
  • Define custom object classes using inheritance, interface implementation, and event creation and handling
Introduction
Overview of .NET
MSIL and JIT
Structure of a .NET Application
The .NET Framework
Tour of Visual Studio
Debugging a .NET Application

The C# Language
Language Features
Console Input and Output
Defining and Calling Methods
Variables, Data Types and Conversion
Operators and Assignment
Value Types vs. Reference Types
Working with Strings
Enumerations

Flow Control
Branching Structures
Looping Structures
Break and Continue
Error Handling
Lambda Expressions

Object-Oriented Programming
Object as an Abstraction
Classes and Namespaces
Fields and Constants
Properties
Methods
Value Types vs. Reference Types Revisited
Scope and This
Constructors and Readonly Fields
Static vs. Instance
Anonymous Types
Classes vs. Structs

Inheritance
Adding Behavior by Extending a Class
Polymorphism
Accessing the Base Class
Overriding Virtual Methods
Hiding vs. Overriding
Abstract and Sealed Classes
Adding Behavior with Extension Methods

Interfaces
Defining Interfaces
Implementing Interfaces
Interfaces and Polymorphism
Interface Inheritance
Interfaces in the .NET Framework

Object Communication
Direct Method Invocation
Registering/Unregistering Listeners
Delegates
The .NET Event Pattern
Custom Event Parameters

Generics
Creating a Generic Method
Creating a Generic Class
Generics in the .NET Framework

Arrays and Collections
One-Dimensional Arrays
Multi-Dimensional Arrays
Jagged Arrays
Iterating Over Arrays
Indexer Methods
The ArrayList Class
Generic Collections in the .NET Framework
Leveraging Framework Functionality

LINQ
Motivation for LINQ
LINQ Providers
LINQ Query Syntax
Deferred Execution
Extension Method Syntax
Filtering with LINQ
Sorting with LINQ
Aggregating with LINQ

Advanced Exception Handling
The Exception Hierarchy
Handling Different Exceptions Differently
Nested Exceptions
Throwing Custom Exceptions

I/O and Serialization
The System.IO Namespace
Working with Directories
Working with Files
Reading from Streams
Writing to Streams
Serializing Complex Data

.NET Threading
Using Multiple Threads
Race Conditions
Monitoring Thread Execution
Synchronizing Threads
Task Parallel Library (TPL)
Waiting for Task Completion
async/await

Object Lifetime
Non-deterministic Finalization
Cleaning Up Unmanaged Resources
The IDisposable Interface
Try, Finally and Using

Reflection
The System.Reflection Namespace and Late Binding
Dynamically Loading Assemblies
The Type Data Type
Creating Instances Dynamically
Dynamic Method Invocation

Newer Features
Optional Arguments
Named Arguments
Dynamic Data Type
Asynchronous Programming
Null-Conditional Operator
using static
Expression-Bodied Functions
nameof Expressions
Send Us a Message
Choose one