This documentation is archived and is not being maintained.

ParallelEnumerable.SequenceEqual(TSource) Method (ParallelQuery(TSource), ParallelQuery(TSource), IEqualityComparer(TSource))

Determines whether two parallel sequences are equal by comparing their elements by using a specified IEqualityComparer{T}.

Namespace:  System.Linq
Assembly:  System.Core (in System.Core.dll)

static member SequenceEqual : 
        first:ParallelQuery<'TSource> * 
        second:ParallelQuery<'TSource> * 
        comparer:IEqualityComparer<'TSource> -> bool 

Type Parameters


The type of the elements of the input sequences.


Type: System.Linq.ParallelQuery(TSource)
A sequence to compare to second.
Type: System.Linq.ParallelQuery(TSource)
A sequence to compare to the first input sequence.
Type: System.Collections.Generic.IEqualityComparer(TSource)
An IEqualityComparer(T) to use to compare elements.

Return Value

Type: System.Boolean
true if the two source sequences are of equal length and their corresponding elements are equal according to the default equality comparer for their type; otherwise, false.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type ParallelQuery(TSource). When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).


The query was canceled with the token passed in through WithCancellation.


first or second is a null reference (Nothing in Visual Basic).


One or more exceptions occurred during the evaluation of the query.

.NET Framework

Supported in: 4

.NET Framework Client Profile

Supported in: 4

Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.