KnowledgeWave Blog

Class Alert: MS 50393 Introduction to C# Programming

Written by Dan St. Hilaire | March 14, 2011

KnowledgeWave has just added a great C# for the month of April. This class is running live in-house at KnowledgeWave at iyr South Burlington, Vermont location. However, this class is available via our Online Live from your Desk training model. Attend from any location. Please contact a representative for more details.

Start Date: April 25th, 2011

KnowledgeWave has just added a great C# class for the end of April. This class is running live in-house at KnowledgeWave, South Burlington, Vermont. This class is available via our Online Live from your Desk training model. Please contact a representative for more details.

About this Course

Complete C# is a five-day instructor-led course which begins by covering the C# language syntax and its semantics as well as the concepts of OOP (object-oriented programming). In the class, students learn how to use the five basic .NET types: classes, enums, structures, delegates, and interfaces. Students also learn file Input/Output, assemblies, reflection, ASP.NET, Windows Forms, and ADO.NET.

Audience Profile

This class is intended for experienced software developers with little to no knowledge of C# or .NET.

At Course Completion

After completing this course, students will be able to:

Create applications with the C# language.

· Understand object-oriented programming with .NET.

· Know how to build desktop applications using Windows forms.

· Interact with relational databases using ADO.NET.

· Build Web sites using ASP.NET.

Course Outline:

Module 1: The Philosophy of .NET This module introduces the core pieces of .NET, including the role of the CLR, types, assemblies and namespaces. It also introduces the C# command line compiler.

Lessons

· Understand the scope of the .NET platform

· Examine the Common Language Runtime (CLR).

· Examine the Common Type System (CTS).

· Examine the Common Language Specification (CLS).

· Survey the core .NET Namespaces.

· Understand the role of the Common Language Infrastructure (CLI).

· Work with the C# command line compiler (csc.exe).

Lab: Getting Up and Running with C#

· Work with the C# compiler (csc.exe).

· Preview the syntax of C#.

· Begin to work with the Visual Studio IDE.

· Check out the ILDasm.exe utility.

After completing this module, students will be able to:

· Understand the Common Language Runtime (CLR).

· Understand the Common Type System (CTS).

· Understand namespaces as a way to categorize types.

· Write applications from scratch using notepad.exe and the command line compiler.

Module 2: Introducing the C# Programming Language This module introduces the basic syntax of C# including class construction, looping and decision constructs, and the C# parameter modifier keywords (out, ref, params). It also examines the use of structured exception handling (SEH) using C#.

Lessons

· Learn the basic constructs of C#: Main(), looping, decision, etc.

· Define class types in C#.

· Learn the role of the out, ref and params keywords.

· Understand method overloading.

· Work with structured exception handling (SEH).

Lab: C# Fundamentals

· Overload a method.

· Define and manipulate a custom exception.

After completing this module, students will be able to:

· Know how to define basic constructs (field declarations, loops, and more).

· Understand how define the Main() method and its purpose in C#.

· Declare parameters to alter their state passing behavior.

· Integrate SEH as a best practice for handling exceptions.

Module 3: Object Oriented Programming with C# This module introduces C# as an object-oriented language and its support for the three main pillars of OOP (object-oriented programming): encapsulation, inheritance, and polymorphism. It also covers a variety of keywords and modifiers used to support OOP.

Lessons

· View the pillars of OOP through C#.

· Define and use abstract classes and interfaces.

· Learn why and how to define nested types.

Lab: Experimenting With Encapsulation

· Use public properties to expose private fields.

· Use overloaded constructors.

· Work with static members and constant values.

Lab: Inheritance and Polymorphism

· Use inheritance to implement a class hierarchy.

· Override base class functionality in derived classes.

· Create an abstract base class with an abstract method.

Lab: Working with Interfaces

· Define an interface.

· Implement the interface throughout a hierarchy.

· Use explicit interface implementation.

· Build and use a custom namespace.

After completing this module, students will be able to:

· Know the purpose of the “this” keyword.

· Understand how encapsulation is enforced in C# through properties and visibility settings.

· Understand how inheritance is used to promote code reuse and simplify maintenance.

· Understand how polymorphism allows behavior to be either inherited or overridden.

· Create object-oriented applications using C#.

Module 4: .NET Programming Fundamentals This module introduces many core concepts of the .NET platform including value-type and reference-type variables, structures, the Console class, enumerations, array processing, string manipulation, delegates, and events.

Lessons

· Understand value types vs. reference types.

· Know the role of System.Object.

· Understand System data types and “nullable” data.

· Process string data and arrays of data.

· Build custom enumerations.

· Build and use custom namespaces.

· Work with delegates and events.

Lab: .NET Programming Fundamentals

· See the difference between value types and reference types.

· Experiment with various array methods.

· Define and use an enumeration.

· Build a complete hierarchy and overload several System.Object methods.

· Implement the IComparable interface to support array sorting.

· Define and use delegates and events.

After completing this module, students will be able to:

· Declare value-type and reference-type variables.

· Declare structs, enums, delegates, and events.

· Declare and interact with arrays and strings.

Module 5: Understanding Generics This module introduces generic programming as a solution to common type programming issues. It covers generic collections, generic methods, and custom generic types with constraints.

Lessons

· Understand the ‘issues’ found without generics.

· Examine the System.Collections.Generic namespace.

· Learn to build custom generic methods.

· Learn to build custom generic types.

· Understand how to constrain generics.

Lab: Working with Generics

· Make use of an existing generic type in the System.Collections.Generic namespace.

· Build and invoke a generic method.

· Build and implement a generic type with constraints.

After completing this module, students will be able to:

· Understand the advantages of using generics.

· Create a strongly-types generics collection.

· Create a generic method.

· Create custom generic types and impose constraints.

Module 6: Understanding .NET Assemblies This module presents private and shared assemblies. It first shows the internals of private assemblies and how they can be configured using application configuration files. It then explains shared assemblies that are signed with a strongly-named key file and installed in the global assembly cache (GAC). Command line tools are demonstrated for configuration and deployment.

Lessons

· Examine the internal composition of .NET assemblies.

· Distinguish between private and shared assemblies.

· Create application configuration files (*.config).

· Understand the .NET versioning scheme.

· Install shared assemblies into the GAC.

· Understand the role of publisher policy assemblies.

Lab: Experimenting with .NET Assemblies

· Create and configure a private assembly.

· Work with application configuration files.

· Build a shared assembly and place it in the GAC.

· Experiment with versioning.

After completing this module, students will be able to:

· Understand private and shared assemblies.

· Configure a .NET assembly.

· Create a shared assembly.

· Use several command line utilities for deployment and configuration.

Module 7: Programming with Windows Forms This module introduces the System.Windows.Forms namespace. It covers how to build a highly stylized main window as a custom Form-derived object. In addition, it shows how to capture and respond to user input with handling mouse and keyboard events within the context of a GUI environment. It also covers the basics of responding to Paint requests and investigates a number of controls supplied by the System.Drawing namespace.

Lessons

· Learn to build a Windows Forms application by hand.

· Understand the Visual Studio Windows Forms project template.

· Handle keyboard and mouse events.

· Survey the Windows Forms controls set.

· Learn how to build Windows Forms dialog boxes.

· Understand Form inheritance.

Lab: Introducing Windows Forms

· Handle mouse input.

· Work with simple GDI+ rendering.

· Build a menu system.

· Build an input dialog box.

After completing this module, students will be able to:

· Create a Windows form application from scratch.

· Create a Windows form application using Visual Studio.

· Utilize several controls on Windows forms.

· Handle different types of events in Windows forms.

· Understand how Windows forms are based on OOP with constructors, properties, and form inheritance.

Module 8: Reflection and Attribute-Based Programming This module introduces .NET reflection as a way to enable dynamic loading and late binding. It also demonstrates the built-in .NET attributes as well as how to create custom attributes. It wraps up by using reflection to read custom attribute values.

Lessons

· Understand the role of reflection.

· Examine the types defined within the System.Reflection namespace.

· Understand how to explicitly load an external assembly.

· Exercise late binding to an assembly.

· Understand the role of attribute-based programming.

· Learn how to leverage predefined attributes.

· Build custom attributes.

· Reflect on attributes.

Lab: Working with Reflection

· Read an assembly name off the command line and dynamically load it.

· Display general information about the assembly.

· Enumerate over the types in the assembly and display information about their members.

Lab: Working with Late Binding, Dynamic Loading, and Custom Attributes

· Build a Windows Forms application that can be extended by late-bound tools.

· Use reflection to determine if an assembly supports a particular interface.

· Dynamically allocate a type into memory.

· Build and reflect over a custom attribute.

After completing this module, students will be able to:

· Understand how reflection works and how it is used in today’s application development.

· Use reflection to discover types in existing assemblies.

· Use .NET attributes to describe and alter the behavior of custom types.

· Create custom attributes to describe custom types.

Module 9: File IO and Object Serialization This module shows students how to manipulate a directories and files using types defined in the System.IO namespace. It demonstrates how to open, read, write, and close text and binary files. It also covers serialization as a way to persist objects to and from stream storage.

Lessons

· Learn to manipulate a directory and file structure.

· Open, read, write, and close text files.

· Persist objects to and read from storage.

Lab: File IO and Object Serialization

· Work with object serialization.

· Work with the DataGridView control.

· Manipulate the file open/save dialogs type.

· Preview the use of some ADO.NET data types.

After completing this module, students will be able to:

· Learn to manipulate a directory and file structure.

· Open, read, write, and close text files.

· Persist objects to and from storage.

Module 10: Introducing ADO.NET This module first introduces ADO.NET as a mean to interact with data sources in connected and disconnected manners. It describes the primary ADO.NET objects that are used to perform crate, read, update, and delete (CRUD) operations in a connected manner. It then shows the primary objects that are used to manipulated data in a disconnected manner with the data adapter and data set.

Lessons

· Understand the ADO.NET model.

· Work with DataReaders.

· Work with DataSets and DataAdapters.

· Work with the DataView class.

· Understand ADO.NET DataRelations.

Lab: An Introduction to ADO.NET

· An Introduction to ADO.NET

· Work with DataReaders.

· Work with data adapters and the DataSet class.

· Build a Windows Forms front end to view your data.

After completing this module, students will be able to:

· Understand the relationships between Connection, Command, DataReader, DataAdapter, and DataSet objects.

· Create a .NET application that uses the connected model.

· Create a .NET application that uses the disconnected model.

· Use a DataView to sort or filter the DataSet results.

Module 11: Advanced ADO.NET Features This module introduces the ADO.NET data provider factory model as a way to allow developers to create database agnostic applications. It also shows how configuration settings are pulled using the Configuration Manager and the ConnectionStrings element. It wraps up with a look at the DataTableReader control.

Lessons

· Investigate the ADO.NET data provider factory model.

· Work with connection string builder objects.

· Understand the element.

· Check out new features of the DataTable.

Lab: Advanced ADO.NET Features

· Select, insert, update, and delete records within a custom database.

· Make use of the new element in a .config file.

· Make use of the new data provider factory model.

· Work with ConnectionStringBuilder objects.

· Examine some data-binding components of Windows Forms.

After completing this module, students will be able to:

· Understand the data provider factory model as a way to create database-agnostic applications.

· Use the Configuration Manager to retrieve application settings.

· Work with the DataTableReader type.

Module 12: Introducing ASP.NET This module introduces the System.Web namespace as a way to create a simple ASP.NET Web application. It describes how the controls are added to ASP.NET Web pages and automatically formatted into HTML and JavaScript. It also covers the global.asax file and the codeless data-binding model that was introduced with .NET 2.0.

Lessons

· Examine the architecture of an ASP.NET web application.

· Understand the single file and code file approach to build web pages.

· Understand the role of ASP.NET web controls.

· Learn about state management.

Lab: An Introduction to ASP.NET

· Build a data-centric Page type.

· Work with ASP.NET web controls.

· Work with ASP.NET data-binding.

· Work with server-side event handling.

After completing this module, students will be able to:

· Understand the ASP.NET Web Page programming model.

· Create a simple ASP.NET Web application.

· Write codeless ASP.NET Web pages that take advantage of the data-binding model.

Prerequisites:

Before attending this course, students must have:

· Experience using graphical IDEs to build and debug software applications.

· Exposure to OOP concepts; however, this is not mandatory.