Method Compare
- Namespace
- Alternet.Editor.TextSource
- Assembly
- Alternet.Editor.v9.dll
Compare(object, object)
Compares two objects and returns a value indicating whether one is less than, equal to, or greater than the other.
public int Compare(object x, object y)
Parameters
Returns
- int
A signed integer that indicates the relative values of
x
andy
, as shown in the following table.Value Meaning Less than zerox
is less thany
. Zerox
equalsy
. Greater than zerox
is greater thany
.
Exceptions
- ArgumentException
Neither
x
nory
implements the IComparable interface.-or-x
andy
are of different types and neither one can handle comparisons with the other.