.NET Framework Class Library
ParallelEnumerable..::.Select<(Of <(TSource, TResult>)>) Method (ParallelQuery<(Of <(TSource>)>), Func<(Of <(TSource, TResult>)>))

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

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

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

Visual Basic (Declaration)
<ExtensionAttribute> _
Public Shared Function Select(Of TSource, TResult) ( _
    source As ParallelQuery(Of TSource), _
    selector As Func(Of TSource, TResult) _
) As ParallelQuery(Of TResult)
Visual Basic (Usage)
Dim source As ParallelQuery(Of TSource)
Dim selector As Func(Of TSource, TResult)
Dim returnValue As ParallelQuery(Of TResult)

returnValue = source.Select(selector)
C#
public static ParallelQuery<TResult> Select<TSource, TResult>(
    this ParallelQuery<TSource> source,
    Func<TSource, TResult> selector
)
Visual C++
[ExtensionAttribute]
public:
generic<typename TSource, typename TResult>
static ParallelQuery<TResult>^ Select(
    ParallelQuery<TSource>^ source, 
    Func<TSource, TResult>^ selector
)
F#
static member Select : 
        source:ParallelQuery<'TSource> * 
        selector:Func<'TSource, 'TResult> -> ParallelQuery<'TResult> 

Type Parameters

TSource

The type of the elements of source.

TResult

The type of elements resturned by selector.

Parameters

source
Type: System.Linq..::.ParallelQuery<(Of <(TSource>)>)
A sequence of values to invoke a transform function on.
selector
Type: System..::.Func<(Of <(TSource, TResult>)>)
A transform function to apply to each element.

Return Value

Type: System.Linq..::.ParallelQuery<(Of <(TResult>)>)
A sequence whose elements are the result of invoking the transform function on each element of source.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type ParallelQuery<(Of <(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).
Exceptions

ExceptionCondition
ArgumentNullException

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

Platforms

Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008, Windows Server 2003

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
Version Information

.NET Framework

Supported in: 4

.NET Framework Client Profile

Supported in: 4
See Also

Reference

Page view tracker