Click or drag to resize
AlgorithmsEqualCollectionsT Method (IEnumerableT, IEnumerableT, IEqualityComparerT)
Determines if the two collections contain equal items in the same order. The passed instance of IEqualityComparer<T> is used for determining if two items are equal.

Namespace: X3Platform.Collections
Assembly: X3Platform.Support (in X3Platform.Support.dll) Version: 1.0.0.0 (2.0.0.0)
Syntax
public static bool EqualCollections<T>(
	IEnumerable<T> collection1,
	IEnumerable<T> collection2,
	IEqualityComparer<T> equalityComparer
)

Parameters

collection1
Type: System.Collections.GenericIEnumerableT
The first collection to compare.
collection2
Type: System.Collections.GenericIEnumerableT
The second collection to compare.
equalityComparer
Type: System.Collections.GenericIEqualityComparerT
The IEqualityComparer<T> used to compare items for equality. Only the Equals member function of this interface is called.

Type Parameters

T
The type of items in the collections.

Return Value

Type: Boolean
True if the collections have equal items in the same order. If both collections are empty, true is returned.
Exceptions
ExceptionCondition
ArgumentNullExceptioncollection1, collection2, or equalityComparer is null.
See Also