DEV Community

Discussion on: No more NullReferenceException for Lists in C#

Collapse
 
nallack profile image
cgray

There is now a better way than checking for null.

Upgrading to C# 8 adds support for compiling with non-nullable reference types. Instances that can be null will now need to be declared with Nullable or T? For short.

This is more inline with Typescript and C++ references.