 | CollectionUtilsSequenceEqualT Method (IEnumerableT, IEnumerableT, IEqualityComparerT) |
Compares two sequences by comparing their items instead of their references. Also checks the case that
both sequences are null. In this case the method returns true.
Namespace: Slash.Collections.UtilsAssembly: Slash.Collections (in Slash.Collections.dll) Version: 1.0.6018.40177
Syntaxpublic static bool SequenceEqual<T>(
IEnumerable<T> sequence1,
IEnumerable<T> sequence2,
IEqualityComparer<T> comparer
)
Public Shared Function SequenceEqual(Of T) (
sequence1 As IEnumerable(Of T),
sequence2 As IEnumerable(Of T),
comparer As IEqualityComparer(Of T)
) As Boolean
public:
generic<typename T>
static bool SequenceEqual(
IEnumerable<T>^ sequence1,
IEnumerable<T>^ sequence2,
IEqualityComparer<T>^ comparer
)
static member SequenceEqual :
sequence1 : IEnumerable<'T> *
sequence2 : IEnumerable<'T> *
comparer : IEqualityComparer<'T> -> bool
Parameters
- sequence1
- Type: System.Collections.GenericIEnumerableT
First sequence. - sequence2
- Type: System.Collections.GenericIEnumerableT
Second sequence. - comparer
- Type: System.Collections.GenericIEqualityComparerT
Comparer to check equality between two objects.
Type Parameters
- T
- Type of items inside sequences.
Return Value
Type:
Boolean
True if the sequences are equal (i.e. the sequences contain equal items in the same order), else false.
See Also