ParallelEnumerable.ElementAt<TSource> Metoda

Definicja

Zwraca element w określonym indeksie w sekwencji równoległej.

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

Parametry typu

TSource

Typ elementów elementu source.

Parametry

source
ParallelQuery<TSource>

Sekwencja zwracająca element z.

index
Int32

Indeks zerowy elementu do pobrania.

Zwraca

TSource

Element w określonej pozycji w sekwencji źródłowej.

Wyjątki

Zapytanie zostało anulowane przy użyciu tokenu przekazanego za pośrednictwem WithCancellation<TSource>(ParallelQuery<TSource>, CancellationToken)elementu .

source jest odwołaniem o wartości null (Nic w Visual Basic).

index wartość jest mniejsza niż 0 lub większa lub równa liczbie elementów w elemecie source.

Podczas oceny zapytania wystąpił co najmniej jeden wyjątek.

Dotyczy

Zobacz też