NullableTypes Class Library

NullableBoolean.CompareTo Method 

Compares this NullableBoolean structure to a specified object and returns an indication of their relative values.

[Visual Basic]
NotOverridable Public Function CompareTo( _
   ByVal value As Object _
) As Integer Implements _
   IComparable.CompareTo
[C#]
public int CompareTo(
   object value
);

Parameters

value
An object to compare, or a null reference (Nothing in Visual Basic).

Return Value

A signed number indicating the relative values of the instance and value.

ValueDescription
A negative integerThis instance is less than value.
ZeroThis instance is equal to value.
A positive integer This instance is greater than value.

-or-

value is a null reference (Nothing in Visual Basic) or Null.

Implements

IComparable.CompareTo

Remarks

Any instance of NullableBoolean , regardless of its value, is considered greater than a null reference (Nothing in Visual Basic) and Null.

Exceptions

Exception TypeCondition
ArgumentException The value is neither null or of type NullableBoolean.

See Also

NullableBoolean Class | NullableTypes Namespace