Returns the sort order of the current instance compared to the specified object.
- target
- An object to compare the current instance to.
The return value is a negative number, zero, or a positive number reflecting the sort order of the current instance as compared to target. For non-zero return values, the exact value returned by this method is unspecified. The following table defines the return value:
Return Value Description A negative integer The value of the current instance is less than the value of target. Zero The value of the current instance is equal to the value of target. Any positive integer The value of the current instance is greater than the value of target, or target is null.
Type Reason ArgumentException target and the current instance are not of the same enumeration type.
Note: This method is implemented to support the IComparable interface.
Namespace: System
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0