AsParallel Method (IEnumerable)

Task Parallel System.Threading

Enables parallelization of a query.

Namespace:  System.Linq
Assembly:  System.Threading (in System.Threading.dll)

Syntax

Visual Basic (Declaration)
Public Shared Function AsParallel ( _
	source As IEnumerable _
) As ParallelQuery
C#
public static ParallelQuery AsParallel(
	IEnumerable source
)

Parameters

source
Type: System.Collections..::.IEnumerable
An IEnumerable<(Of <(T>)>) to convert to a ParallelQuery<(Of <(TSource>)>).

Return Value

The source as a ParallelQuery to bind to ParallelEnumerable extension methods.

Exceptions

ExceptionCondition
System..::.ArgumentNullException source is a null reference (Nothing in Visual Basic).

See Also