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元素数。
在查询评估期间发生一个或多个异常。