Compare To(Object) Method
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Compares this instance to a specified object and returns an integer that indicates whether the value of this instance is less than, equal to, or greater than the value of the object.
virtual int System.IComparable.CompareTo(System::Object ^ value) = IComparable::CompareTo;
int IComparable.CompareTo (object value);
abstract member System.IComparable.CompareTo : obj -> int override this.System.IComparable.CompareTo : obj -> int
Function CompareTo (value As Object) As Integer Implements IComparable.CompareTo
An object to compare, or
A signed number indicating the relative values of this instance and
|Less than zero||This instance is less than |
|Zero||This instance is equal to |
|Greater than zero||This instance is greater than |
An Int16, regardless of its value, is considered greater than a null reference.