Breyta

Deila með


ParallelEnumerable.Contains Method

Definition

Determines in parallel whether a sequence contains a specified element.

Overloads

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)

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

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

Source:
ParallelEnumerable.cs
Source:
ParallelEnumerable.cs
Source:
ParallelEnumerable.cs

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);
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

source
ParallelQuery<TSource>

A sequence in which to locate a value.

value
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

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

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

See also

Applies to

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

Source:
ParallelEnumerable.cs
Source:
ParallelEnumerable.cs
Source:
ParallelEnumerable.cs

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

source
ParallelQuery<TSource>

A sequence in which to locate a value.

value
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

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

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

See also

Applies to