ParallelEnumerable.Cast<TResult>(ParallelQuery) Method

Definition

Converts the elements of a ParallelQuery to the specified type.

C#
public static System.Linq.ParallelQuery<TResult> Cast<TResult>(this System.Linq.ParallelQuery source);

Type Parameters

TResult

The type to convert the elements of source to.

Parameters

source
ParallelQuery

The sequence that contains the elements to be converted.

Returns

ParallelQuery<TResult>

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

Exceptions

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

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

Applies to

Product Versions
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1
UWP 10.0

See also