Course Overview:
C# is a .NET-aware object-oriented programming language that is
similar in syntax and style to both C++ and Java. To make effective
use of the language, therefore, developers must understand both the
essential elements of object-oriented programming and the realization
of those concepts in C#. This five- day course covers the
fundamentals of object-oriented programming in C#. The course covers
both the language and several of the classes available from the .NET
framework class libraries. It illustrates the effective use of
object-oriented features such as inheritance and polymorphism.
Numerous exercises and laboratories provide students valuable “hands
on” experience with C# programming.
Course Audience:
This course is aimed at anyone wanting to develop applications in C#.
Although it outlines some of the features for graphical user
interfaces, this course is aimed primarily at application development.
Course
Prerequisites: Attendees should understand the basics of
programming. No knowledge of C-style syntax, object-oriented
concepts, or other object-oriented programming languages is required.
Course Outline:
Introduction:
What .NET is. A first C# program. Compiling and running C#
programs. Selected references to other resources.
Basic Syntax:
C#’s lexical conventions. Types and implicit and explicit type
conversion. Operators and control flow statements.
Classes and
Objects: The concepts, syntax, and semantics for classes.
Defining fields, methods, and properties. Instantiating objects.
Initializing objects with constructors and initializers.
Encapsulating fields. Enumerations. Static fields and methods.
Specialization and
Inheritance: Class specialization through subclassing.
Inheritance of implementation. Calling superclass constructors and
methods. The five levels of access (public, protected, private,
internal, and the combination of internal and protected).
Type Promotion and
Polymorphism: Overriding methods in subclasses. Type
promotion (or “upcasting”). Downcasting and the “is” operator.
Polymorphism. How a subclass must obey the superclass contract.
Abstract classes and methods. Sealed classes.
Miscellaneous
Class Topics: The Object class. Structures versus
classes. Comparing objects for value equality. Forms of parameter
passing. Copying objects.
Arrays and
Strings: Arrays and strings as objects. How to create and
use instances of each. Strings versus StringBuilders.
Interfaces:
Interface specialization through the definition and implementation of
interfaces. The use of classes versus interfaces. Why C# permits
multiple inheritance of interface but only single inheritance of
implementation. Using interfaces to define roles objects play.
Delegates and
Events: Defining delegates to encapsulate method
references. Defining events and event handlers. The relationship
between events and delegates.
Namespaces and
Assemblies: Namespaces as a mechanism for organizing
classes. Defining and accessing namespaces. A summary of some of the
standard .NET namespaces. Defining and using assemblies.
Attributes:
Assigning and using attributes of types and assemblies. Pre-defined
attributes. Defining custom attributes.
Basic Data
Structures: Using the data structure classes in the
Collections namespace (Queue, Stack, ArrayList, Hashtable). The 2.0 generics. Arrays
versus lists. Using Enumerators to iterate over lists.
Input and Output:
The classes in the System.IO namespace for reading and writing files
and memory areas. Reading and writing characters and bytes. Object
serialization.
Exceptions:
Throwing and catching exceptions. Defining custom exception classes.
Using exception information to recover from exceptions.
Threads:
The concept of threads (versus processes). Creating and starting
threads. Object synchronization.
The .NET
Platform:
A brief overview of the .NET platform.
|