Method
Compare
abstract virtual func Compare(left: T, right: T) -> int
Declaring type: Comparer<T>
Module: System.Collections
Assembly: System.Runtime.dll
Source file: Comparer.rvn
Defined by Comparer<T>.Compare · Required implementation (no default).
Interface implementation: Required implementation (no default).
Orders two values.
Parameters
| Name | Type | Description |
|---|---|---|
left |
T | The first value. |
right |
T | The second value. |
Return value
Negative, zero or positive for less, equivalent or greater.
Remarks
Use the sign, not the magnitude. Ordering must be transitive and reverse signs for reversed unequal inputs.