Special Notices

Please note, Effective 2nd of March 2020, this course will be on .NET Core 3.0/C# 8 and Visual Studio 2019.

Overview

Microsoft's .NET (Framework and Core) present developers with unprecedented opportunities. From web applications to desktop and mobile platform applications - all can be built with equal ease, using substantially the same skill-set. But to make the most of this potential, developers must have a thorough grasp of language skills, OO programming concepts and common techniques

This course concentrates on the C# programming language itself, to fully prepare delegates fully in readiness for using the

.NET Framework/Core. No Object-Orientated knowledge is assumed - the course provides a suitable OO primer. From basic procedural syntax to sophisticated object-oriented programming techniques, delegates will learn how to write .NET applications with code that is robust and maintainable.

The course is presented as a mixture of lectures, demos and hands-on exercises. Practical sessions follow all main topics, designed to reinforce the points covered. Additional information is provided in appendices to extend the learning experience after the course has been completed.

The course provides a good starting point for delegates wishing to undertake Microsoft exam 70-483 (Programming in C#) although further study is likely to be required before sitting the exam.

Target Audience:

This intensive course is intended for developers who will use C# to write .NET Framework or .NET Core applications and who are relatively new to the C# programming language.

Prerequisites

Delegates must understand the fundamentals of programming. Delegates can gain this level of knowledge by attending QA's 'Programming Foundations' (QAPROGFOU) course

Please note:

  • Delegates attending this course via Extended Classroom will be required to provide dual monitors.
  • Before attending this class delegates must have a Microsoft account (signing up one is free). The instructions on how to set up a Microsoft account can be found here.

Learning Outcomes

  • Write code that includes sequence, selection and iteration constructs
  • Create and use classes and structures (types), including fields, properties, methods, delegates and events
  • Use private, internal, protected and public visibility modifiers
  • Use exception-handling to create robust applications
  • Create derived classes that inherit from custom-written or .NET classes
  • Create interfaces and apply techniques of polymorphism effectively and appropriately
  • Work with generic types
  • Leverage the power of C# features
  • Use delegates
  • Understand the event handling paradigm
  • Use lambda expressions in C# code
  • Use LINQ (Language Integrated Query)
  • Understand their resource management obligations

In addition to the above, the following techniques are introduced during the course:

  • Test-Driven Development (using XUnit)
  • Dependency Injection (as used in .NET Core)
  • Introduction to Entity Framework (Core)

Course Outline

Module 1: Introduction to Object Orientation

  • This ensures all delegates have a grounding in the principles of Object Orientation.

Module 2: OO and C Sharp

  • Get started on how C# implements Object Orientation
  • Start using Unit Test (which we then use in many of the following chapters)

Module 3: Introduction to Visual Studio & C#

  • The .NET Framework; The Common Language Runtime; The Common Type System
  • C# Features; Introduction to references, namespaces and assemblies
  • How to debug in Visual Studio
  • Get to know your way around Visual Studio

Module 4: Syntax I

  • Classes
  • Methods, parameters, overloaded methods
  • Comments and identifiers
  • Built-In Types
  • Scope
  • Casts
  • If and ternary expressions
  • Loops

Module 5: Syntax 2

  • Properties
  • Constructors
  • Arrays

Module 6: Syntax 3

  • Value and Reference Types
  • Null references
  • Nullable types
  • ‘ref’ and ‘out’
  • Static
  • Enums
  • Extension methods
  • Partial classes

Module 7: Expressing Commonality

  • Setting the scene for inheritance, interface, generics, delegates

Module 8: Generics

  • Generic Collections
  • Generic Classes
  • Array range operators
  • Indexers

Module 9: Inheritance

  • Concept of inheritance; Substitutability; Extending a simple class
  • 'virtual', 'override' and 'sealed' modifiers
  • Polymorphism
  • Abstract classes
  • Upcasting and safe downcasting

Module 10: Console User Interfaces

  • Building user interfaces with the console
  • Using class libraries as part of a full application

Module 11: Interfaces

  • Polymorphism with interfaces
  • Multiple interfaces

Module 12: Dependency Injection

  • SOLID
  • Benefits of DI
  • Scope

Module 13: Delegates and Lambdas

  • Refresh of generic methods and classes
  • Generic delegates (Func, Action, Predicate)
  • Lambdas

Module 14: LINQ

  • The language features behind LINQ
  • The LINQ API and query pattern
  • Groups, Joins, Projections, Aggregations, ‘let’

Module 15: More LINQ

  • ...a continuation

Module 16: Intro to Entity Framework

  • A brief primer on Entity Framework Core
  • Code First
  • Database First

Module 17: Handling Exceptions

  • Errors vs. Exceptions
  • The 'try', 'catch', 'finally' paradigm
  • Using 'throw'
  • Creating your own exceptions
  • 'checked' and 'unchecked' expressions.

Module 18: Putting It All Together, including Windows Forms

  • Consolidate what we have done and show how it fits into
  • a Windows Forms app (Framework)
  • a web app (Core)

Module 19: Consuming Events

  • Understanding events in .NET
  • Writing event handlers

Module 20: Producing Events

  • The event conventions
  • Raising custom events

Module 21: Garbage Collection

  • Garbage collection and its impact
  • Finalizers; The 'Dispose' pattern; IDisposable
  • The 'using' statement

Module 20: The Way Ahead

  • Review
  • Related Learning