Byte::IComparable::CompareTo Method
.NET Framework 4.5
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
- value
- Type: System::Object
An object to compare with this instance, or nullptr.
Return Value
Type: System::Int32A signed integer that indicates the relative order of this instance and value.
Return value | Description |
|---|---|
Less than zero | This instance precedes value in the sort order. |
Zero | This instance occurs in the same position as value in the sort order. |
Greater than zero | This instance follows value in the sort order. -or- value is nullptr. |
Implements
IComparable::CompareTo(Object)| Exception | Condition |
|---|---|
| ArgumentException | value is not a Byte. |
This member is an explicit interface implementation. It can be used only when the Byte instance is cast to an IComparable interface.