liveBook · Manning

Nullable reference types

Nullable reference types are a C# compiler feature that annotates reference types and performs compile-time analysis of possible null values.

How 2 Manning books explain it

.NET in Action, Second Edition

A nullable reference type is a C# type annotation that allows a reference to represent null and participates in compile-time nullability analysis.

How it is used
Marks properties and method results that may be null so compiler warnings can guide application code.
How deep it goes
Explains annotations, project configuration, warnings, and modeling choices through working examples; stops short of compiler-analysis internals.
Examples
Uses an options property, a book-title constructor, and a nullable comic lookup to expose different reasons for nullability.
What you can do after
Apply it via C# annotations and project settings to address warnings without permitting null where a value is required.

Read how .NET in Action, Second Edition explains nullable reference types →

ASP.NET Core in Action, 3e

Nullable reference types are a C# compiler feature that represents and checks whether reference-type values may be null.

How it is used
Uses nullable annotations to align minimal API handler parameters with missing or null request values.
How deep it goes
Explains annotations, project enablement, binding behavior, and analyzer warnings, but does not descend into compiler implementation.
Examples
Demonstrates Product?, nullable route and query parameters, and a net7.0 project file with Nullable enabled.
What you can do after
Apply nullable annotations and compiler or IDE warnings to configure safer optional parameters in minimal API endpoints.

Read how ASP.NET Core in Action, 3e explains nullable reference types →

Related concepts

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.