Null is often called the billion-dollar mistake, and for good reason. It can be very problematic. The idea of
something having a nothing value sounds dangerous in software engineering. Over the years, C# has introduced
features such as Nullable Reference Types to help developers write better, more robust, and safe code, but many
people still don't know how to use it properly. In this course, Ed Charbeneau will start with the basics and
teach you everything there is to know about null, from how to use it, from when not to use and how to take
an existing full stack application that isn't using it properly and re-engineer it to make full use of the feature.
Course Curriculum
4h 38m 9 sections
Welcome
00:45Free preview
Who is the course for and prerequisites
00:43Free preview
What will you learn in this course?
02:05Free preview
Why is null important in C#?
01:43
Why is null a problem in C#?
04:24
The C# type system and value types
04:10
Reference types in C#
03:14
Unpacking the default keyword
03:52
How C# uses types on the heap and stack
05:20
A brief history of null in C#
00:52
Nullable value types in C# 2+
11:13
Nullable reference types in C# 8+
05:44
Setting the nullable context
03:24
Understanding common null compiler warnings
11:34
Null intent is for compilers and developers too
09:33
What is the null conditional operator?
06:26
Using the null conditional operator with arrays
07:02
What is null conditional short-circuiting?
03:05
What is the null coalescing operator?
06:10
What is the null coalescing conditional operator?
06:01
What is the null forgiving operator?
06:30
API design with null intent introduction
01:16
Working with null and properties
05:01
Unpacking the "Exiting the constructor" null warning
05:37
What is the required keyword, and when to use it
05:19
Advanced API intent with the AllowNull attribute
03:30
Advanced API intent with the DisallowNull attribute
06:54
Advanced API intent with the MemberNotNull attribute
04:58
Advanced API intent with the NotNullIfNotNull attribute
03:18
Introduction to pattern matching and the is keyword
06:04
Property matching to filter null
10:40
Capturing null with the pattern matching switch operator
05:16
The BlazingPizza project overview
01:45
Enabling the nullable context and treating warnings as errors
04:27
How null affects EF migrations
07:43
How null affects EF relationships
07:25
Using the Visual Studio references feature to find null intent
06:34
How null affects full-stack objects
04:02
When to use the required keyword
05:46
Updating shared classes with proper null intent
09:59
Shared library walkthrough wrap up
06:10
Web API best practices, GET operations
03:50
Web API best practices, PUT operations
04:20
Web API best practices, POST operations
02:05
Web API best practices, DELETE operations
00:58
How to handle null with authorization and claims
05:36
Improving an API with the DisallowNull attribute
02:46
Fixing null issues with null operators
03:09
Handling RazorComponents Authorization values
02:00
How to handle Null with HttpClient
05:31
Updating the application state object
03:07
Applying null to Blazor pages
02:58
Best practices for loading without relying on null in Blazor
Ed is a Microsoft MVP and an international speaker, writer, online influencer, a Developer Advocate for Progress, and expert on all things web development. Ed enjoys geeking out to cool new tech, brainstorming about future technology, and admiring great design.