component-detection
component-detection copied to clipboard
Introduce nullable reference types
Nullable reference types were introduced in C# 8 (.NET Core 3.0) and are enabled by default in new projects created targeting .NET 6. They help to prevent NullReferenceExceptions with 3 main features:
- Improved static flow analysis that determines if a variable may be null before dereferencing it
- Attributes that annotate APIs so that the flow analysis determines null-state
- Variable annotations that developers use to explicitly declare the intended null-state for a variable
We should use the nullable reference migration guide to plan our migration.
NOTE: Adding nullable reference types is not considered a semver breaking change.