Both MSDN references for IComparable.CompareTo()
and IComparable<T>.CompareTo()
state the following:
By definition, any object compares greater than (or follows) Nothing
, and two null references compare equal to each other.
Nothing
in VB corresponds to null
in C#.
Note that the previous paragraph states:
The meaning of the comparisons, "less than," "equal to," and "greater than," depends on the particular implementation.
But instance references that aren't null are always greater than null references, no matter how you compare instances of your class.