The main purpose of the Nullable Reference Type in C# 8 is to mainly solve the mistake made by a scientist while working with null references. In 1965, Tony Hoare committed the mistake while working on ALGOL programming language. The pointers could be null but it is not expected from the framework. It has been proved that null pointers are a major source of bugs over an extended period of time.
The Add non-nullable reference types in a C# feature was suggested on User Voice in 2011 but was pushed to the 15th slot. interestingly, the same feature is the latest to be introduced on User Voice. The reason for the delay in the implementation is due to the fact that C# make use of null references everywhere.
Commenting on the development, Mads Torgersen, Lead Designer of C# disclosed that the null references are the primary default value of every reference type. He also added that null is a sensible value. Moreover, a field doesn't have a value.
By default, Microsoft has selected to consider reference types as non-nullable instead of non-nullable reference types in C#. It also provides a comprehensive mechanism to deal with nullable types. Torgersen added that nullable reference types are rate and should require a new annotation.
Basically, a nullable reference type is defined with "?" symbol adjacent to public string as shown below
class Person {
public string FirstName;
public string? MiddleName; // May be null
public string LastName;
}
You should note that the first and last statements are not null. The null identifiers can be easily identified