![Collapse image](collapse_all.gif)
![Expand Image](expand_all.gif)
![CollapseAll image](collall.gif)
![ExpandAll image](expall.gif)
![DropDown image](drpdown.gif)
![DropDownHover image](drpdown_orange.gif)
![Copy image](copycode.gif)
![CopyHover image](copycodeHighlight.gif)
Algorithms..::EqualCollections<(Of <T>)> Method (IEnumerable<(Of <T>)>, IEnumerable<(Of <T>)>, IEqualityComparer<(Of <T>)>) |
See Also |
![]() ![]() |
[This topic is pre-release documentation and is subject to change in future releases. Blank topics are included as placeholders.]
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: Wintellect.PowerCollections
Assembly:
PowerCollections (in PowerCollections.dll)
Syntax
C# |
---|
public static bool EqualCollections<T>( IEnumerable<T> collection1, IEnumerable<T> collection2, IEqualityComparer<T> equalityComparer ) |
Visual Basic (Declaration) |
---|
Public Shared Function EqualCollections(Of T) ( _ collection1 As IEnumerable(Of T), _ collection2 As IEnumerable(Of T), _ equalityComparer As IEqualityComparer(Of T) _ ) As Boolean |
Visual C++ |
---|
public: generic<typename T> static bool EqualCollections ( IEnumerable<T>^ collection1, IEnumerable<T>^ collection2, IEqualityComparer<T>^ equalityComparer ) |
Parameters
- collection1
- IEnumerable<(Of <T>)>
The first collection to compare.
- collection2
- IEnumerable<(Of <T>)>
The second collection to compare.
- equalityComparer
- IEqualityComparer<(Of <T>)>
The IEqualityComparer<T> used to compare items for equality. Only the Equals member function of this interface is called.
Return Value
True if the collections have equal items in the same order. If both collections are empty, true is returned.
Type Parameters
- T
- The type of items in the collections.
Exceptions
Exception | Condition |
---|---|
System..::ArgumentNullException | collection1, collection2, or equalityComparer is null. |
See Also
Algorithms Class
Wintellect.PowerCollections Namespace