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

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

Gets an IEqualityComparer<IEnumerable<T>> implementation that can be used to compare collections of elements (of type T). Two collections of T's are equal if they have the same number of items, and corresponding items are equal, considered in order. This is the same notion of equality as in Algorithms.EqualCollections, but encapsulated in an IEqualityComparer<IEnumerable<T>> implementation.

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

Syntax


public static IEqualityComparer<IEnumerable<T>> GetCollectionEqualityComparer<T>()
Public Shared Function GetCollectionEqualityComparer(Of T) As IEqualityComparer(Of IEnumerable(Of T))
public:
generic<typename T>
static IEqualityComparer<IEnumerable<T>^>^ GetCollectionEqualityComparer()

Type Parameters

T

Return Value

IEqualityComparer<IEnumerable<T>> implementation suitable for comparing collections of T for equality.

Examples


The following code creates a Dictionary where the keys are a collection of strings.
C#
Dictionary<IEnumerable<string>, int> =
    new Dictionary<IEnumerable<string>, int>(Algorithms.GetCollectionEqualityComparer<string>());