component-detection icon indicating copy to clipboard operation
component-detection copied to clipboard

Introduce nullable reference types

Open JamieMagee opened this issue 3 years ago • 0 comments

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.

JamieMagee avatar Mar 07 '23 19:03 JamieMagee