From Zero to Hero: Working with Null in C#

From Zero to Hero: Working with Null in C#

English | MP4 | AVC 1920×1080 | AAC 44KHz 2ch | 56 Lessons (4h 38m) | 834 MB

Learn how to properly use null in C# in a modern way and write better, robust code

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.

Table of Contents

1 Welcome
2 Who is the course for and prerequisites
3 What will you learn in this course?
4 Why is null important in C#?
5 Why is null a problem in C#?
6 The C# type system and value types
7 Reference types in C#
8 Unpacking the default keyword
9 How C# uses types on the heap and stack
10 A brief history of null in C#
11 Nullable value types in C# 2+
12 Nullable reference types in C# 8+
13 Setting the nullable context
14 Understanding common null compiler warnings
15 Null intent is for compilers and developers too
16 What is the null conditional operator?
17 Using the null conditional operator with arrays
18 What is null conditional short-circuiting?
19 What is the null coalescing operator?
20 What is the null coalescing conditional operator?
21 What is the null forgiving operator?
22 API design with null intent introduction
23 Working with null and properties
24 Unpacking the “Exiting the constructor” null warning
25 What is the required keyword, and when to use it
26 Advanced API intent with the AllowNull attribute
27 Advanced API intent with the DisallowNull attribute
28 Advanced API intent with the MemberNotNull attribute
29 Advanced API intent with the NotNullIfNotNull attribute
30 Introduction to pattern matching and the is keyword
31 Property matching to filter null
32 Capturing null with the pattern matching switch operator
33 The BlazingPizza project overview
34 Enabling the nullable context and treating warnings as errors
35 How null affects EF migrations
36 How null affects EF relationships
37 Using the Visual Studio references feature to find null intent
38 How null affects full-stack objects
39 When to use the required keyword
40 Updating shared classes with proper null intent
41 Shared library walkthrough wrap up
42 Web API best practices, GET operations
43 Web API best practices, PUT operations
44 Web API best practices, POST operations
45 Web API best practices, DELETE operations
46 How to handle null with authorization and claims
47 Improving an API with the DisallowNull attribute
48 Fixing null issues with null operators
49 Handling RazorComponents Authorization values
50 How to handle Null with HttpClient
51 Updating the application state object
52 Applying null to Blazor pages
53 Best practices for loading without relying on null in Blazor
54 Unpacking the AuthenticationState component
55 When to use EditorRequired in a RazorComponent
56 Wrapping up the BlazingPizza walk through

Homepage