C# Programming For Experienced Developers

Duration: 3 days
Type: intermediate

Description

This course introduces Java or C++ programmers to C# and the fundamentals of building and deploying applications on the .NET platform.

Prerequisites

Delegates should have a minimum of two years Java or C++ programming experience.

List of Modules

Fundamental Concepts of .NET

Compiling to Intermediate Language (IL)
The Common Language Runtime (CLR)
Comparing the CLR and the Java VM
The Common Type System (CTS)
Assemblies and Application Domains
Running the C# compiler manually
Examining assemblies using ILDASM
Locating and loading assemblies
Deploying assemblies to the GAC

Creating and Compiling Applications

Installing and running Visual Studio (VS)
Creating new solutions and projects in VS
Building console and GUI based applications
Building and referencing class libraries
Building ASP based Web Applications and Web Services

Useful Development Tools

Writing unit tests with NUnit
Creating NAnt and MSBuild deployment scripts
Object Persistence with NHibernate

Procedural Coding and Built In Objects

Basic types and their CTS mappings
Understanding the object class
Using Strings and StringBuilders
Converting between basic types
Boxing and unboxing basic types
Constructs for iteration and selection
Working with the three types of array
Documenting C# code using XML

Object Oriented Development Part One

Class declarations in C#
Understanding partial classes
Organizing classes into namespaces
Access modifiers and their meaning
Declaring fields using the static, readonly, constant and volatile modifiers
Adding constructors to classes
Using other constructors via this and base
Object initialization in detail
Using properties instead of Java accessor (getter and setter) methods
Allowing clients to use array notation by implementing an indexer method
Destructor methods and finalization
Comparing GC in Java and .NET
Declaring methods and parameters
Passing parameters by reference and for output
Using variable number parameters

Object Oriented Development Part Two

Declaring derived classes
Polymorphism with virtual and override
Opting out of polymorphism using new
Safe downcasting using is and as
Abstract base classes and Interfaces
Releasing resources via IDisposable
Differentiating between Java Inner Classes and C# Nested Classes
Throwing and catching exceptions
Comparing the exception management philosophies of Java and C#

Event Handling in .NET

Understanding function addressing
Using delegates to hold function addresses
Working with anonymous delegates
Adding events to a class
Customizing the event model

Generic Programming in C#

Introduction to Generic Programming
How generics works within the CLR
Using the generic collection classes
Declaring your own generic types
Applying constraints to type parameters
Examining generic types via reflection

Advanced Language Features

How to overload operators
Using structs to create local objects
Pointers and unsafe code