Skip to content

Commit

Permalink
Merge pull request umbraco#4071 from umbraco/Nullable-reference-types
Browse files Browse the repository at this point in the history
v10: Created new article for Nullable reference types
  • Loading branch information
sofietoft authored Jun 9, 2022
2 parents dd5f9b2 + b24ce97 commit fb9d94f
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions Implementation/Nullable-Reference-Types/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
versionFrom: 10.0.0
Meta.Title: Nullable Reference Types
Meta.Description: In this article we describe what Nullable reference types is.
---

# Nullable Reference Types

Starting from Umbraco 10 Nullable Reference Typs is enabled by default in Umbraco.

Nullable reference types is a group of features introduced in C# 8.0 that can be used to minimize the likelihood that your code causes the runtime to throw `System.NullReferenceException`.

Nullable reference types includes three features that help you avoid these exceptions, including the ability to explicitly mark a reference type as nullable:

- 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.

To learn more about Nullable Reference Types, make sure to check out the [Microsoft Documentation](https://docs.microsoft.com/en-us/dotnet/csharp/nullable-references)

0 comments on commit fb9d94f

Please sign in to comment.