Basically, a Nullable<T> is a structure that explains things like calling .HasValue will never throw a NullReferenceException . I was wondering why - given the NULL value, which does not matter - the comparison with null always true , even when using Object.ReferenceEquals , which I thought would return false, because it is a structure.
Is there any special behavior built into the CLR to make this possible? This probably also explains why the general structure constraint does not allow nullables.
Best wishes,
Oliver Hanappi
source share