Windows Dev Center

The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

ParallelEnumerable.Cast<TResult> Method (ParallelQuery)


Converts the elements of a ParallelQuery to the specified type.

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

public static ParallelQuery<TResult> Cast<TResult>(
	this ParallelQuery source


Type: System.Linq.ParallelQuery

The sequence that contains the elements to be converted.

Return Value

Type: System.Linq.ParallelQuery<TResult>

A sequence that contains each element of the source sequence converted to the specified type.

Type Parameters


The type to convert the elements of source to.

Exception Condition

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


The type of the source sequence could not be converted to TResult.

Universal Windows Platform
Available since 4.5
.NET Framework
Available since 4.0
Portable Class Library
Supported in: portable .NET platforms
Windows Phone
Available since 8.1
Return to top
© 2015 Microsoft