Compares two objects and returns a value indicating whether
one is less than, equal to, or greater than the other.
Namespace: CleanCode.IOAssembly: CleanCode (in CleanCode.dll) Version: 1.2.3.0 (1.2.03)
Syntax
Parameters
- x
- Type: System Object
The first object to compare.
- y
- Type: System Object
The second object to compare.
Return Value
Negative number if x is greater than y. Zero if x equals y. Positive number if x is less than y.Implements
IComparer Compare(Object, Object)Exceptions
Exception | Condition |
---|---|
System ArgumentException | Neither x nor y implements the IComparable interface or x and y are of different types and neither one can handle comparisons with the other. |
See Also