Boolean.IComparable.CompareTo Method
.NET Framework (current version)
This API supports the .NET Framework infrastructure and is not intended to be used directly from your code.
Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, follows, or occurs in the same position in the sort order as the other object.
Namespace: System
Assembly: mscorlib (in mscorlib.dll)
Parameters
- obj
- Type: System.Object
An object to compare with this instance, or null.
Return Value
Type: System.Int32A signed integer that indicates the relative order of this instance and obj.
Return value | Condition |
---|---|
Less than zero | This instance is false and obj is true. |
Zero | This instance and obj are equal (either both are true or both are false). |
Greater than zero | This instance is true and obj is false. -or- obj is null. |
Implements
IComparable.CompareTo(Object)This member is an explicit interface implementation. It can be used only when the Boolean instance is cast to an IComparable interface.
Show: