Returns the sort order of the current instance compared
to the specified object
.
[Edit]
Parameters
- obj
- A object to compare to the current instance.
[Edit]
Returns
The return value is a negative number, zero, or a positive number reflecting the sort order of the current instance as compared to obj. For non-zero return values, the exact value returned by this method is unspecified. The following table defines the return value:
Return Value | Condition |
---|
A negative number | Current instance is false and
obj is true. |
Zero | Current instance == obj
. |
Any
positive number | Current instance is true and
obj is false, or obj is a null
reference. |
[Edit]
Exceptions
Remarks
Requirements
Namespace: System
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0