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

要擷取的項目之以零為起始索引。

傳回

TSource

位於來源序列中指定位置的項目。

例外狀況

source 是 null 參考 (在 Visual Basic 中為 Nothing)。

index 小於 0 或大於或等於 source 中的項目數目。

評估查詢的期間發生一或多個例外狀況。

適用於

另請參閱