Object Oriented Programming in C# and .NET

5 days
unetabn
Organized by
5 days

Overview of .NET

.NET is designed to be used for developing multiple types of applications. You'll get an overview of the applications you can build. You will also be introduced to the different flavors contained within .NET. A developer is nothing without their tools, so additionally you will be introduced to invaluable tools such as Visual Studio and GitHub Copilot.

  • What is a .NET Application?
  • .NET Framework versus .NET
  • .NET Applications: ASP.NET Core, Web API, WPF, Blazor, .NET MAUI, ...
  • .NET Developer Tools

The .NET Application

Gain a professional understanding of structuring .NET applications during the design phase with Visual Studio Solutions and Projects. Explore how your projects are compiled into assemblies and executed by the .NET Runtime, to gain a fundamental understanding of how .NET works.

  • Visual Studio Solutions and Projects
  • Understanding Namespaces and Assemblies

Classes and Objects

Delve into the core principles of Object-Oriented Programming (OOP) with this module, which covers the foundational aspects of .NET programming. Learn to design and implement classes, the blueprints for objects, and understand how these objects are instantiated at runtime. This chapter will guide you through creating and manipulating variables for storing numerical data, text, and complex objects, and applying operators to them. Additionally, gain insights into structuring classes, encapsulating state and behavior in objects, and an introductory overview of debugging techniques within Visual Studio.

  • What is a Class?
  • Fields, Methods and Properties
  • Introduction to Debugging
  • Namespaces
  • LAB: Work with Classes, Class Members and Instances

Instance Constructors

Whenever you instantiate an object from a class, it needs to be constructed. This module discusses how .NET handles this.

  • Instance Constructors
  • Constructor Initializers
  • Overloading Constructors
  • LAB: Work with Constructors and Object Initializers

Types in .NET

Whether you're trying to store numbers, text or objects, you need to put them into variables. These variables will inevitably end up somewhere in memory. Depending on the type of the variable, it will get stored in different kinds of memory, called the stack and the heap. This has consequences on the behavior of your variables as well as the overall performance of your program.

  • Type Categories in .NET
  • Value Types, Reference Types and Immutable Reference Types
  • Custom Value Types: Structure and Enumeration
  • Boxing and Unboxing
  • Type Inference
  • Arguments of Functions. Pass by Value, by Reference. Passing Output
  • LAB: Enums, Pass by Reference, Structs and StringBuilder

Static Members and Static Classes

From time to time, you need some functionality that is not part of one object, but instead part of a complete class. This allows you to use methods without creating an object, or storing data that is reachable for every object. In .NET we call this static members and classes.

  • Static Members
  • Static Constructors
  • Static Classes
  • Extension Methods
  • LAB: Car Factory

Inheritance

Explore the fundamental concept of inheritance in C# and its pivotal role in the architecture of .NET itself. We will see how we can use Inheritance to extend a class and add functionality to it. To help you a bit with a practical example, we'll create an ASP.NET Core MVC application to illustrate Inheritance.

  • General Principle of Inheritance
  • Access Modifiers: Public, Private, Protected, File and Internal
  • LAB: Creating a Web Shop in ASP.NET Core

Polymorphism

On top of Inheritance in OO Programming comes the marvel known as Polymorphism. It allows us to add a different implementation for specific types, based on a generic definition of a function. With polymorphism this is an easy feat to accomplish.

  • Inheritance & Polymorphism
  • Overriding Methods & Properties
  • Using the Base Class
  • Sealed Classes, Methods and Properties
  • The Object Class
  • Overriding the ToString, Equals and GetHashCode Method
  • LAB: Adding Polymorphism to an Employee Class

Abstract classes and Interfaces

Discover how abstract classes and interfaces in C# facilitate clear, flexible designs by establishing contracts for other classes to follow. This overview explores their roles in enforcing consistency and enabling polymorphic behaviors, vital for building scalable, maintainable software architectures.

  • Abstract Classes
  • Defining Interfaces
  • Implementing Interfaces
  • Interface Examples in .NET
  • LAB: Implementing IComparable and Controlling Devices

Collections

Storing elements in a collection is crucial in programming languages. This chapter talks about some of the most fundamental collections in .NET.

  • Arrays in .NET
  • Multidimensional Arrays
  • Indexer Properties
  • The for, foreach and while Loops

Generics

In C#, you can consider two separate mechanisms when writing reusable code across different types: inheritance and generics. Where inheritance provides reusability with the concept of base types, generics express reusability by providing a template that contains type placeholders. Generics, in comparison to inheritance, can increase type safety and reduce the need for casting and boxing within your applications. This, in turn, can improve the performance of your code. This module will illustrate how and when to use generics in your .NET applications. We'll use a WPF application to illustrate Generics.

  • How to use Generics
  • Creating your own Generics
  • Generic Constraints
  • LAB: Sports Team or Movietheek

Exception Handling

Whenever something unexpected happens, like the network going down, we want our programs to handle this behavior in a user-friendly way. With Exceptions we can react fittingly when these problems occur.

  • Exceptions in .NET
  • The try-catch-when-finally Keywords
  • Creating Custom Exceptions

Using Delegates

One of the more challenging aspects of .NET programming is to be able to store methods in a variable. That is exactly what delegates allow us to do. This concept is used with a lot of .NET concepts, like asynchronous programming, event handling, LINQ, ...

  • Setting up a Timer using a delegate
  • Combining Delegates as a Multicast Delegate
  • Building a Programmable Robot using Delegates
  • Anonymous Methods and Lambda Expressions
  • LAB: Calculator

Events in .NET

Events are based on delegates, allowing your application to react to something happening, like a button click. Because of this events are fundamental in UI development frameworks like WPF, .NET MAUI and Xamarin.

  • Creating Events
  • Using Events in a UI
  • LAB: Music Store

LINQ Query Syntax

LINQ allows to use query-expressions that are very akin to SQL queries, but that can be applied to multiple types of data. This makes certain operations like filtering and sorting data very easy.

  • Anonymous Types
  • Using LINQ with IEnumerable
  • Func Delegates
  • Query Operations from, where, order, group and select
  • Using LINQ with IQueryable
  • Accessing a Database using Entity Framework Core
  • LAB: Creating a Shop in WPF

AI Assisted Development

In this modern age of AI, developers don't just have to incorporate AI in their applications, they can also use it to create these very applications. Find out how to get the most out of GitHub Copilot by discovering all of its features, asking the right questions, and learning its strengths and weaknesses.

  • Introduction to Large Language Models
  • GitHub Copilot: Features and Limitations
  • Prompting your Assistant
  • Improving your Assistant with Copilot Extensions
  • Copilot Best Practices

Modern C# Language Features

The C# language itself has evolved dramatically over the last couple of years. If you have been struggling to keep up with all the details of these language features, this module is for you.

  • Nullable Reference Types
  • Value Tuples and discards
  • Pattern Matching
  • Global and Implicit Usings
  • Required and Init-Only Properties
  • Records
  • File-Scoped Types and Namespaces
  • Using Raw String Literals
  • Required Members
  • Generic Attributes
  • Specifying the Return Type for Lambda Functions
  • Primary constructors
  • Collection expressions, inline arrays and the spread operator
  • Aliasing types
  • LAB: Using ValueTuples with LINQ

Concurrency

How does your machine handle multiple processes? How can a single process perform multiple tasks simultaneously? In this module, we'll explore the advantages and challenges associated with concurrency.

  • What is Concurrency?
  • Understanding Processes and Threads
  • Different Kinds of Concurrency
  • Scheduling Threads

Multithreading in .NET

Everyone begins by mastering the fundamentals. The Thread class represents the most fundamental approach to implementing concurrency. It's crucial to grasp this class's concepts to fully comprehend and appreciate the subsequent libraries and frameworks.

  • The Thread Class
  • Using the ThreadStatic attribute
  • Exceptions and Threads
  • Understanding Thread Pooling
  • Debugging Multi-Threaded Code

Thread Synchronization

Using shared memory in a multi-threaded environment can be dangerous and confusing. In this module, we'll explain what can go wrong and how to avoid it using different locking mechanisms.

  • Race Conditions and Dead Locks
  • Avoiding Race Conditions
  • Synchronizing Threads: Locks, Monitors, Signals, ...
  • Synchronization Guidelines
  • Thread Safety in .NET
  • LAB: Horse Race

Tasks

Using threads directly is quite complicated. Instead, we can make use of tasks to do our bidding. A Task represents an asynchronous operation or a unit of work that can be executed concurrently with other tasks. It's part of the Task Parallel Library (TPL) in .NET and provides a higher-level abstraction for asynchronous programming compared to using threads directly. There are again advantages and disadvantages to using this library, and we'll explore them in this module.

  • What are Tasks?
  • Task continuation
  • Waiting Asynchronously
  • Dealing with Exceptions
  • Task Cancellation
  • ThreadLocal<T> vs. AsyncLocal<T>

The Async and Await Syntax Explained

The async and await keywords are among the most commonly used language constructs in .NET. However, surprisingly few people understand their inner workings.

  • What is Asynchronous Programming?
  • Comparing async/await to other Asynchronous Constructs
  • Diving into the async and await Keywords
  • Understanding ValueTask and its advantages and uses
  • LAB: using Async and Await

Asynchronous Programming in .NET

After grasping the async and await keywords, you can delve into handling exceptions, managing cancellations, and tracking the progress of an async task. This module covers these topics in detail.

  • A History of Asynchronous Programming in .NET
  • Understanding SynchronizationContext
  • Cancellation, Progress and Exception Handling
  • ConfigureAwait
  • IAsyncEnumerable
  • Async Guidelines
  • LAB: Async and Await in a Library

This course teaches you how to start programming with Visual Studio, C# and .NET. You will get familiar with the C# language syntax and .NET Object-Oriented Programming concepts, such as classes, objects, inheritance, polymorphism, ... In this course, you'll get a taste of the different types of applications and .NET libraries through examples in WPF, Entity Framework Core and ASP.NET Core.

Once you've finished this training, you can start your journey to learn building things like web applications, desktop or mobile apps, backends, games, IoT, bots, etc. All with C#.

This training targets developers with no or limited C# experience. A basic understanding of programming - in whatever language - is advised.

Contact Us
  • Address:
    U2U nv/sa
    Z.1. Researchpark 110
    1731 Zellik (Brussels)
    BELGIUM
  • Phone: +32 2 466 00 16
  • Email: info@u2u.be
  • Monday - Friday: 9:00 - 17:00
    Saturday - Sunday: Closed
Say Hi
© 2025 U2U All rights reserved.