ParallelEnumerable.Contains ParallelEnumerable.Contains ParallelEnumerable.Contains ParallelEnumerable.Contains Method

Definition

Determines in parallel whether a sequence contains a specified element.

Overloads

Contains<TSource>(ParallelQuery<TSource>, TSource, IEqualityComparer<TSource>) Contains<TSource>(ParallelQuery<TSource>, TSource, IEqualityComparer<TSource>) Contains<TSource>(ParallelQuery<TSource>, TSource, IEqualityComparer<TSource>) Contains<TSource>(ParallelQuery<TSource>, TSource, IEqualityComparer<TSource>)

Determines in parallel whether a sequence contains a specified element by using a specified IEqualityComparer<T>.

Contains<TSource>(ParallelQuery<TSource>, TSource) Contains<TSource>(ParallelQuery<TSource>, TSource) Contains<TSource>(ParallelQuery<TSource>, TSource) Contains<TSource>(ParallelQuery<TSource>, TSource)

Determines in parallel whether a sequence contains a specified element by using the default equality comparer.

Contains<TSource>(ParallelQuery<TSource>, TSource, IEqualityComparer<TSource>) Contains<TSource>(ParallelQuery<TSource>, TSource, IEqualityComparer<TSource>) Contains<TSource>(ParallelQuery<TSource>, TSource, IEqualityComparer<TSource>) Contains<TSource>(ParallelQuery<TSource>, TSource, IEqualityComparer<TSource>)

Determines in parallel whether a sequence contains a specified element by using a specified IEqualityComparer<T>.

public:
generic <typename TSource>
[System::Runtime::CompilerServices::Extension]
 static bool Contains(System::Linq::ParallelQuery<TSource> ^ source, TSource value, System::Collections::Generic::IEqualityComparer<TSource> ^ comparer);
public static bool Contains<TSource> (this System.Linq.ParallelQuery<TSource> source, TSource value, System.Collections.Generic.IEqualityComparer<TSource> comparer);
static member Contains : System.Linq.ParallelQuery<'Source> * 'Source * System.Collections.Generic.IEqualityComparer<'Source> -> bool
<Extension()>
Public Function Contains(Of TSource) (source As ParallelQuery(Of TSource), value As TSource, comparer As IEqualityComparer(Of TSource)) As Boolean
Type Parameters
TSource

The type of elements of source.

Parameters
value
TSource TSource TSource TSource

The value to locate in the sequence.

comparer
IEqualityComparer<TSource>

An equality comparer to compare values.

Returns

true if the source sequence contains an element that has the specified value; otherwise, false.

Exceptions

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

source is a null reference (Nothing in Visual Basic).

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

See Also

Contains<TSource>(ParallelQuery<TSource>, TSource) Contains<TSource>(ParallelQuery<TSource>, TSource) Contains<TSource>(ParallelQuery<TSource>, TSource) Contains<TSource>(ParallelQuery<TSource>, TSource)

Determines in parallel whether a sequence contains a specified element by using the default equality comparer.

public:
generic <typename TSource>
[System::Runtime::CompilerServices::Extension]
 static bool Contains(System::Linq::ParallelQuery<TSource> ^ source, TSource value);
public static bool Contains<TSource> (this System.Linq.ParallelQuery<TSource> source, TSource value);
static member Contains : System.Linq.ParallelQuery<'Source> * 'Source -> bool
<Extension()>
Public Function Contains(Of TSource) (source As ParallelQuery(Of TSource), value As TSource) As Boolean
Type Parameters
TSource

The type of elements of source.

Parameters
value
TSource TSource TSource TSource

The value to locate in the sequence.

Returns

true if the source sequence contains an element that has the specified value; otherwise, false.

Exceptions

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

source is a null reference (Nothing in Visual Basic).

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

See Also

Applies to