Version

CreateComparer<T>(Comparison<T>) Method

Creates an IComparer that wraps the specified comparison.
Syntax
public static IComparer<T> CreateComparer<T>( 
   Comparison<T> comparison
)

Parameters

comparison
The comparison delegate to use when comparing elements.

Type Parameters

T
The type of object being compared

Return Value

A new IComparer<T> that uses the specified comparison to perform the compare.
Requirements

Target Platforms: Android 4.4+, iOS 8+

Development Environments: Visual Studio 2015+, Visual Studio for Mac Preview, Xamarin for Visual Studio 4.2+

See Also