C# Essentials

Current Version: 4.8

Summary

Microsoft .NET is an advance in programming technology that greatly
simplifies application development, both for traditional, proprietary
applications and for the emerging paradigm of Web-based services. .NET
is a complete restructuring of Microsoft's entire system infrastructure
and represents a major learning challenge for programmers developing
applications on Microsoft platforms.

This two-day intensive course is designed for the experienced
programmer to help you quickly come up to speed on the C# language. It
is current to Visual Studio 2017, .NET Framework 4.7 and C# 7.
Important newer features such as dynamic data type, named and optional
arguments, the use of variance in generic interfaces, asynchronous
programming keywords, and tuples are covered in a final chapter. An
appendix covers the fundamentals of Language Integrated Query (LINQ).

This course concisely covers the essentials of programming using
Microsoft's C# programming language. It starts with a brief chapter,
".NET: What You Need to Know,
which gets you 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#. The next
chapter discusses how C# relates to the .NET Framework. The following
chapter covers delegates and events. The course includes a succinct
introduction to creating GUI programs using Windows Forms. The course
concludes with a chapter covering the newer features in C#. Appendices
provide a tutorial on Visual Studio 2017, an overview of LINQ, coverage
of unsafe code and pointers in C#, and using .NET Framework 4.7.

The course is practical, with many example programs and a progressively
developed case study. The goal is to quickly bring you up to speed in
writing C# programs. The student will receive a comprehensive set of
materials, including course notes and all the programming examples.

Prerequisites

The student should be an experienced application
developer or architect. Some background in object-oriented programming
would be helpful.

Course Objectives

On completion of this course, the student should be able to

Acquire a working knowledge of C# programming

Learn about important interactions between C# and the .NET
Framework

Learn how to implement simple GUI programs using Windows
Forms

Gain a working knowledge of dynamic data type, named and
optional arguments, and other new features in C# 4.0

Learn how to do asynchronous programming using new keywords
in C# 5.0

Become aware of new features in C# 6.0 and C# 7.0

Length

2 Days

Format

Instructor-led course, with practical computer-based exercises.

Course Outline

1. NET: What You Need to Know

.NET Executables and the CLR

A .NET Testbed for C# Programming

Using Visual Studio 2017

2. C# Overview for the Sophisticated Programmer

First C# Console Application

Namespaces

Data Types

Conversions

Control Structures

Subroutines and Functions

Parameter Passing

Strings

Arrays

Implicitly Typed Variables

Console I/O

Formatting

Exception Handling

3. Object-Oriented Programming in C#

Classes

Access Control

Methods and Properties

Asymmetric Accessor Accessibility

Static Data and Methods

Constant and Readonly Fields

Auto-Implemented Properties

Inheritance

Overriding Methods

Abstract Classes

Sealed Classes

Access Control and Assemblies

4. C# and the .NET Framework

Components

Interfaces

System.Object

.NET and COM

Collections

IEnumerable and IEnumerator

Copy Semantics in C#

Generic Types

Type-Safe Collections

Object Initializers

Collection Initializers

Anonymous Types

Attributes

5. Delegates and Events

Delegates

Anonymous Methods

Lambda Expressions

Random Number Generation

Events

6. Introduction to Windows Forms

Creating Windows Applications Using Visual Studio 2017

Partial Classes

Buttons, Labels and Textboxes

Handling Events

Listbox Controls

7. Newer Features in C#

Dynamic Data Type

Named Arguments

Optional Arguments

Variance in Generic Interfaces

Asynchronous Programming Keywords

New Features in C# 6.0 and 7.0

Appendix A. Using Visual Studio 2017

Signing in to Visual Studio

Overview of Visual Studio 2017

Creating a Console Application

Project Configurations

Debugging

Multiple-Project Solutions

Appendix B. Language Integrated Query (LINQ)

What Is LINQ?

Basic Query Operators

Filtering

Ordering

Aggregation

Appendix C. Unsafe Code and Pointers in C#

Unsafe Code

C# Pointer Type

Appendix D. Using .NET Framework 4.7

Installing .NET Framework 4.7

DirectX Dependency

New Features in .NET 4.7

Appendix E. Learning Resources

Hardware and Software Requirements

Course examples require Microsoft Visual Studio 2017 and Windows 7sp1
or higher. The free Visual Studio Community 2017 can be used. For .NET
4.7 support the .NET Framework 4.7 Developer Pack is required. See the
appropriate course Setup Guide for details.

A good minimal hardware profile for this course consists of a 2 GHz or
better CPU, 2 GB of RAM (4 GB recommended), and at least 10 GB of free
disk space for tools installation and courseware.

Oracle and Java are registered trademarks of Oracle and/or its affiliates.
PL/SQL and SQL*Plus are trademarks or registered trademarks of Oracle
Corporation. Microsoft is either a registered trademark or trademark of Microsoft
Corporation in the United States and/or other countries. MVS is a registered
trademark of the International Business Machines Corp. in the U.S. or other
countries or both. Motif, OSF/1, UNIX, and the "X Device" are registered
trademarks and IT DialTone and The Open Group are trademarks of The Open Group
in the U.S. and other countries. All other trademarks are the property of
their respective owners.