Wintellect.PowerCollections Namespace
Algorithms Class
Algorithms Methods
GhostDoc Pro Sample Help File

Algorithms..::..GetReverseComparison<(Of <(<'T>)>)> Method

Reverses the order of comparison of an Comparison<T>. The resulting comparison can be used, for example, to sort a collection in descending order.

Namespace:  Wintellect.PowerCollections
Assembly:  PowerCollections (in PowerCollections.dll)

Syntax


public static Comparison<T> GetReverseComparison<T>(
	Comparison<T> comparison
)
Public Shared Function GetReverseComparison(Of T) ( _
	comparison As Comparison(Of T) _
) As Comparison(Of T)
public:
generic<typename T>
static Comparison<T>^ GetReverseComparison(
	Comparison<T>^ comparison
)

Type Parameters

T
The type of items that are being compared.

Parameters

comparison
Type: Comparison<(Of <(<'T>)>)>
The comparison to reverse.

Return Value

A Comparison<T> that compares items in the reverse order of comparison.

Exceptions


ExceptionCondition
ArgumentNullExceptioncomparison is null.