ParallelEnumerable.ElementAt<TSource>(ParallelQuery<TSource>, Int32) メソッド
定義
並列シーケンス内の指定したインデックス位置にある要素を返します。Returns the element at a specified index in a parallel sequence.
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
の要素の型。The type of the elements of source
.
パラメーター
- source
- ParallelQuery<TSource>
要素を返すシーケンス。A sequence to return an element from.
- index
- Int32
取得する要素の、0 から始まるインデックス。The zero-based index of the element to retrieve.
戻り値
ソース シーケンス内の指定された位置にある要素。The element at the specified position in the source sequence.
例外
WithCancellation
経由で渡されたトークンで、クエリが取り消されました。The query was canceled with the token passed in through WithCancellation
.
source
が null 参照 (Visual Basic では Nothing) です。source
is a null reference (Nothing in Visual Basic).
index
が 0 未満か source
に含まれている要素数以上の値です。index
is less than 0 or greater than or equal to the number of elements in source
.
クエリ評価中に 1 つまたは複数の例外が発生しました。One or more exceptions occurred during the evaluation of the query.