Why does Nullable HasValue property not throw NullReferenceException on Nulls?

Technically, “ndate” is not null – it is a value type, with it’s value specified as being null.

When you write DateTime?, this is just shorthand for Nullable<DateTime>, which is a struct. There is no way for this to technically be null, since it’s not a reference type.

Leave a Comment