Module 08 of 12

Modern C# Features

Lessons

About This Module

C# keeps evolving, and code written today looks different from code written ten years ago. This module introduces the features that make modern C# shorter, safer, and easier to read, so you can understand and write current code.

You will see records for simple data types, pattern matching with switch expressions for cleaner decisions, and nullable reference types for catching null problems before the program runs. The last lesson is an overview of what is new in recent C# versions, including primary constructors and collection expressions.

Watch the lessons in order, then continue on to Async & Concurrency.

Lessons

4 videos
01

C# Records Explained: Less Code, More Power

Builds a type from scratch as a regular class, then replaces the boilerplate with a record to show what records give you.

02

Using Modern SWITCH Syntax in C#

Shows switch expressions, introduced in C# 8 and built on pattern matching, and how they compare with the classic switch statement.

03

C# Nullable Reference Types: Everything You Need to Know

Explains how nullable reference types work, how they help prevent null reference errors, and how to use them in modern .NET applications.

04

What's New in C# 12

Dustin Campbell and Mads Torgersen of the C# team take you through the features in C# 12, including collection expressions and primary constructors.