ParallelEnumerable.Take<TSource>(ParallelQuery<TSource>, Int32) メソッド
定義
並列シーケンスの先頭から指定された数だけ連続する要素を返します。Returns a specified number of contiguous elements from the start of a parallel sequence.
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
の要素の型。The type of elements of source
.
パラメーター
- source
- ParallelQuery<TSource>
要素を返すシーケンス。The sequence to return elements from.
- count
- Int32
返す要素数。The number of elements to return.
戻り値
入力シーケンスの先頭から指定された数だけの要素を格納しているシーケンス。A sequence that contains the specified number of elements from the start of the input sequence.
例外
source
が null 参照 (Visual Basic では Nothing) です。source
is a null reference (Nothing in Visual Basic).
WithCancellation
経由で渡されたトークンで、クエリが取り消されました。The query was canceled with the token passed in through WithCancellation
.
クエリ評価中に 1 つまたは複数の例外が発生しました。One or more exceptions occurred during the evaluation of the query.