From 51debdde3ed6ffaadec7fafd8391d8cd12441cfa Mon Sep 17 00:00:00 2001 From: Jonathan Klemensen Date: Tue, 7 Jun 2022 13:22:10 +0200 Subject: [PATCH 1/2] Created new article for Nullable reference types --- .../Nullable-Reference-Types/index.md | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 Implementation/Nullable-Reference-Types/index.md diff --git a/Implementation/Nullable-Reference-Types/index.md b/Implementation/Nullable-Reference-Types/index.md new file mode 100644 index 00000000000..bf7e0d548b2 --- /dev/null +++ b/Implementation/Nullable-Reference-Types/index.md @@ -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) + From b24ce9737d2088f21091cfced8aa5d03bb973a14 Mon Sep 17 00:00:00 2001 From: jonat123 <54025331+jonat123@users.noreply.github.com> Date: Wed, 8 Jun 2022 15:12:51 +0200 Subject: [PATCH 2/2] Update Implementation/Nullable-Reference-Types/index.md Co-authored-by: sofietoft --- Implementation/Nullable-Reference-Types/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Implementation/Nullable-Reference-Types/index.md b/Implementation/Nullable-Reference-Types/index.md index bf7e0d548b2..3d29960059e 100644 --- a/Implementation/Nullable-Reference-Types/index.md +++ b/Implementation/Nullable-Reference-Types/index.md @@ -16,5 +16,5 @@ Nullable reference types includes three features that help you avoid these excep - 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) +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)