ParallelEnumerable.ElementAt<TSource> メソッド

定義

並列シーケンス内の指定したインデックス位置にある要素を返します。

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

型パラメーター

TSource

sourceの要素の型。

パラメーター

source
ParallelQuery<TSource>

要素を返すシーケンス。

index
Int32

取得する要素の 0 から始まるインデックス。

返品

TSource

ソース シーケンス内の指定した位置にある要素。

例外

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

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

index が 0 未満か、 source内の要素の数以上です。

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

適用対象

こちらもご覧ください