forked from umbraco/UmbracoDocs
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request umbraco#4071 from umbraco/Nullable-reference-types
v10: Created new article for Nullable reference types
- Loading branch information
Showing
1 changed file
with
20 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) | ||
|