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.CollectionsAssembly: X3Platform.Support (in X3Platform.Support.dll) Version: 1.0.0.0 (2.0.0.0)
Syntaxpublic static bool EqualCollections<T>(
IEnumerable<T> collection1,
IEnumerable<T> collection2,
IEqualityComparer<T> equalityComparer
)
public:
generic<typename T>
static bool EqualCollections(
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:
BooleanTrue if the collections have equal items in the same order. If both collections are empty, true is returned.
Exceptions
See Also