ParallelEnumerable.Take<TSource> メソッド

定義

並列シーケンスの先頭から指定した数の連続する要素を返します。

public:
generic <typename TSource>
[System::Runtime::CompilerServices::Extension]
 static System::Linq::ParallelQuery<TSource> ^ Take(System::Linq::ParallelQuery<TSource> ^ source, int count);
public static System.Linq.ParallelQuery<TSource> Take<TSource>(this System.Linq.ParallelQuery<TSource> source, int count);
static member Take : System.Linq.ParallelQuery<'Source> * int -> System.Linq.ParallelQuery<'Source>
<Extension()>
Public Function Take(Of TSource) (source As ParallelQuery(Of TSource), count As Integer) As ParallelQuery(Of TSource)

型パラメーター

TSource

sourceの要素の型。

パラメーター

source
ParallelQuery<TSource>

要素を返すシーケンス。

count
Int32

返す要素の数。

返品

入力シーケンスの先頭から指定した数の要素を含むシーケンス。

例外

source は null 参照です (Visual Basicでは Nothing)。

クエリは、 WithCancellation<TSource>(ParallelQuery<TSource>, CancellationToken)を介して渡されたトークンで取り消されました。

クエリの評価中に 1 つ以上の例外が発生しました。

適用対象

こちらもご覧ください