filmov
tv
C# Nullable reference types – No more null reference exceptions!
![preview_player](https://i.ytimg.com/vi/NDweaZZZcbc/maxresdefault.jpg)
Показать описание
Are you tired of null reference exceptions and unexpected crashes due to uninitialized variables? There’s a very handy feature in C# called nullable references types that will help you catch this before it becomes a problem!
In this video we are exploring nullable reference types in C#. This is a great addition to the C# language!
This language feature was first introduced in C# 8.0 and is a great way to find potential problems, before it becomes an issue!
Enable nullable reference types in your project by modifying the csproj file.
This video also includes details on how to use the C# 9.0 language features 'new expression' and 'init only setters'.
Table of contents:
00:00 Introduction
00:33 Why do null reference exceptions occur?
01:14 C# 9.0: 'new expression'
04:29 Nullable Reference Types
05:06 Nullable Reference Type Syntax
05:21 Enable the Nullable Reference Types on the Project level
05:56 Compiler Warnings
06:33 Introducing a Nullable Reference Type
09:07 More Compiler Warnings
09:55 Damn it/Null forgiving operator
12:39 C# 9.0: Init only setters
15:34 Enable the Nullable REference Types using Directives
16:04 Summary
DISCLAIMER: This video and description contains affiliate links, which means that if you click on one of the links, I may receive a small commission.
In this video we are exploring nullable reference types in C#. This is a great addition to the C# language!
This language feature was first introduced in C# 8.0 and is a great way to find potential problems, before it becomes an issue!
Enable nullable reference types in your project by modifying the csproj file.
This video also includes details on how to use the C# 9.0 language features 'new expression' and 'init only setters'.
Table of contents:
00:00 Introduction
00:33 Why do null reference exceptions occur?
01:14 C# 9.0: 'new expression'
04:29 Nullable Reference Types
05:06 Nullable Reference Type Syntax
05:21 Enable the Nullable Reference Types on the Project level
05:56 Compiler Warnings
06:33 Introducing a Nullable Reference Type
09:07 More Compiler Warnings
09:55 Damn it/Null forgiving operator
12:39 C# 9.0: Init only setters
15:34 Enable the Nullable REference Types using Directives
16:04 Summary
DISCLAIMER: This video and description contains affiliate links, which means that if you click on one of the links, I may receive a small commission.
Комментарии