Mono Class Library: System Namespace

System.Comparison<T> Delegate

Represents the method that compares two objects of the same type. [Edit]
public delegate int Comparison<T> (T x, T y)

Type Parameters

T
Documentation for this section has not yet been entered. [Edit]

Parameters

x
The first object to compare. [Edit]
y
The second object to compare. [Edit]

Value

A int containing a value that reflects the sort order of the objects.

ValueCondition
Less than zerox is less than y.
Zero x equals y.
Greater than zerox is greater than y.

A int containing a value that reflects the sort order of the objects.

ValueCondition
Less than zerox is less than y.
Zero x equals y.
Greater than zerox is greater than y.
Documentation for this section has not yet been entered. [Edit] [Edit] [Edit]

Remarks

Note:

This delegate is used by the method Array.Sort(T[], Comparison<T>)(T[], Comparison<T>), and in List<T>to sort the elements of the collection.

[Edit]

Requirements

Namespace: System
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 2.0.0.0
Since: .NET 2.0