Most types in .NET are reference types, and null is a "not reference" that can be assigned to a variable or field to indicate the absence of an object.
All other types in .NET are value types. There is always a value with a type value, so there is no way to indicate "no value". Therefore, an implementation can define specific special values to indicate this. Often, for this, a field of type of value MinValue (constant) is used. Therefore, using DateTime.MinValue for a date of birth may indicate "unknown" or "not applicable" (for example, for a corporate entity).
DbNUll exists to express an RDBMS null value that is slightly different from .NET. In most cases, this will be translated to zero or similar.
Finally, Nullable<T> is a wrapper for value types to express "unknowns" more directly and is generally better than using MinValue , but was added in .NET 2, so older projects may have started using MinValue before Nullable<T> .
Richard
source share