ParallelEnumerable.Select Method

Definition

Projects in parallel each element of a sequence into a new form.

Overloads

Select<TSource,TResult>(ParallelQuery<TSource>, Func<TSource,Int32,TResult>)

Projects in parallel each element of a sequence into a new form by incorporating the element's index.

Select<TSource,TResult>(ParallelQuery<TSource>, Func<TSource,TResult>)

Projects in parallel each element of a sequence into a new form.

Select<TSource,TResult>(ParallelQuery<TSource>, Func<TSource,Int32,TResult>)

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

Projects in parallel each element of a sequence into a new form by incorporating the element's index.

C#
public static System.Linq.ParallelQuery<TResult> Select<TSource,TResult>(this System.Linq.ParallelQuery<TSource> source, Func<TSource,int,TResult> selector);

Type Parameters

TSource

The type of the elements of source.

TResult

The type of elements returned by selector.

Parameters

source
ParallelQuery<TSource>

A sequence of values to invoke a transform function on.

selector
Func<TSource,Int32,TResult>

A transform function to apply to each element.

Returns

ParallelQuery<TResult>

A sequence whose elements are the result of invoking the transform function on each element of source, based on the index supplied to selector.

Exceptions

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

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

More than Int32.MaxValue elements are enumerated by the query. This condition might occur in streaming scenarios.

See also

Applies to

.NET 10 and other versions
Product Versions
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1
UWP 10.0

Select<TSource,TResult>(ParallelQuery<TSource>, Func<TSource,TResult>)

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

Projects in parallel each element of a sequence into a new form.

C#
public static System.Linq.ParallelQuery<TResult> Select<TSource,TResult>(this System.Linq.ParallelQuery<TSource> source, Func<TSource,TResult> selector);

Type Parameters

TSource

The type of the elements of source.

TResult

The type of elements returned by selector.

Parameters

source
ParallelQuery<TSource>

A sequence of values to invoke a transform function on.

selector
Func<TSource,TResult>

A transform function to apply to each element.

Returns

ParallelQuery<TResult>

A sequence whose elements are the result of invoking the transform function on each element of source.

Exceptions

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

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

See also

Applies to

.NET 10 and other versions
Product Versions
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1
UWP 10.0