Development · Native API migration preview · Coverage validation in progress Published release →

API Browser

Method

Compare

func Compare(left: T, right: T) -> int

Declaring type: FunctionComparer<T>
Module: System.Collections
Assembly: System.Runtime.dll
Source file: FunctionComparer.rvn

Implements Comparer<T>.Compare

Orders two values.

Parameters

Name Type Description
left T The first value.
right T The second value.

Return value

Int32

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.