null-keyword
A special value meaning a reference points at nothing.
In more detail
Using a null reference as if it were an object throws a NullReferenceException at run time. C# nullable reference types move most of these mistakes to compile-time warnings.
Related terms
- nullable reference types — A C# compiler feature that tracks whether each reference might be null and warns when code uses one without checking.
- reference type — A type whose variables hold a reference, a pointer to an object stored elsewhere, rather than the value itself.
- null-coalescing assignment — The C# ??= operator, which assigns the right-hand value only if the left-hand variable is currently null.
Taught in
- The C# Language: Types, Variables, and Flow Control — Modern .NET Core, C# & Enterprise Microservices
- Collections, Generics, and LINQ — Modern .NET Core, C# & Enterprise Microservices
- The Options Pattern: Strongly Typed Configuration — Modern .NET Core, C# & Enterprise Microservices
- Manual Object Mapping — Modern .NET Core, C# & Enterprise Microservices