Nullable reference types
Nullable reference types are a C# compiler feature that annotates reference types and performs compile-time analysis of possible null values.
.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
- optional function argumentuses · An optional function argument is an input corresponding to a parameter that a caller is not required to supply because omission is permitted by the function's interface.
- missing valueaddresses · A missing value is a marker or condition indicating that an expected data value or reference is absent, unavailable, unknown, or inapplicable.
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.

