So we can have nullable primitive types
bool? x = null;
Which is great. But my understanding has always been that it's not actually a null
reference since
x.HasValue; //false
is possible.
I had always assumed that nullables were classes or structures with operator and Equals
overloading implemented but today I checked
Object.ReferenceEquals(null, x); //true
And I have no clue how that can be.
How can it at the same time be a reference that points to null
and have non-extension properties on it that are invokable?!
If this is a compiler trick, does anyone know documentation on what exactly it does?