แก้ไข

แชร์ผ่าน


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.

public:
generic <typename TSource, typename TResult>
[System::Runtime::CompilerServices::Extension]
 static System::Linq::ParallelQuery<TResult> ^ Select(System::Linq::ParallelQuery<TSource> ^ source, Func<TSource, int, TResult> ^ selector);
public static System.Linq.ParallelQuery<TResult> Select<TSource,TResult> (this System.Linq.ParallelQuery<TSource> source, Func<TSource,int,TResult> selector);
static member Select : System.Linq.ParallelQuery<'Source> * Func<'Source, int, 'Result> -> System.Linq.ParallelQuery<'Result>
<Extension()>
Public Function Select(Of TSource, TResult) (source As ParallelQuery(Of TSource), selector As Func(Of TSource, Integer, TResult)) As ParallelQuery(Of TResult)

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

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.

public:
generic <typename TSource, typename TResult>
[System::Runtime::CompilerServices::Extension]
 static System::Linq::ParallelQuery<TResult> ^ Select(System::Linq::ParallelQuery<TSource> ^ source, Func<TSource, TResult> ^ selector);
public static System.Linq.ParallelQuery<TResult> Select<TSource,TResult> (this System.Linq.ParallelQuery<TSource> source, Func<TSource,TResult> selector);
static member Select : System.Linq.ParallelQuery<'Source> * Func<'Source, 'Result> -> System.Linq.ParallelQuery<'Result>
<Extension()>
Public Function Select(Of TSource, TResult) (source As ParallelQuery(Of TSource), selector As Func(Of TSource, TResult)) As ParallelQuery(Of TResult)

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