C# 8.0 and Nullable Reference Types
-
Perhaps one of the biggest problem areas in C#—and one that’s been around since C# 1.0—surrounds the fact that reference types can be null and, in fact, reference types are null by default.
"I call it my billion-dollar mistake."
-
Perhaps one of the biggest problem areas in C#—and one that’s been around since C# 1.0—surrounds the fact that reference types can be null and, in fact, reference types are null by default.
"I call it my billion-dollar mistake."
Sometimes I use a class with a
public static readonly MyClass Null = new MyClass();
singleton instance that does nothing to save on null checking.
Wout
-
Perhaps one of the biggest problem areas in C#—and one that’s been around since C# 1.0—surrounds the fact that reference types can be null and, in fact, reference types are null by default.
"I call it my billion-dollar mistake."