.NET Framework Class Library |
ParallelEnumerable..::.AsParallel Method (IEnumerable) |
ParallelEnumerable Class See Also Send Feedback |
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
Exception | Condition |
---|---|
System..::.ArgumentNullException | source is a null reference (Nothing in Visual Basic). |