ParallelEnumerable.ElementAt<TSource> 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
傳回平行序列中指定索引處的專案。
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
要檢索元素的零基索引。
傳回
TSource
位於來源序列中指定位置的元素。
例外狀況
source 是空參考(Visual Basic 中無任何參考)。
index 小於 0 或大於或等於 中 source元素的數量。
在查詢評估過程中發生了一個或多個例外。