Enumerable.SkipLast<TSource>(IEnumerable<TSource>, Int32) Metoda

Definice

Vrátí novou výčtovou kolekci, která obsahuje prvky z source posledního count prvku zdrojové kolekce vynechána.

public:
generic <typename TSource>
[System::Runtime::CompilerServices::Extension]
 static System::Collections::Generic::IEnumerable<TSource> ^ SkipLast(System::Collections::Generic::IEnumerable<TSource> ^ source, int count);
public static System.Collections.Generic.IEnumerable<TSource> SkipLast<TSource> (this System.Collections.Generic.IEnumerable<TSource> source, int count);
static member SkipLast : seq<'Source> * int -> seq<'Source>
<Extension()>
Public Function SkipLast(Of TSource) (source As IEnumerable(Of TSource), count As Integer) As IEnumerable(Of TSource)

Parametry typu

TSource

Typ prvků v výčtu kolekce.

Parametry

source
IEnumerable<TSource>

Instance výčtu kolekcí.

count
Int32

Počet prvků, které se mají vynechat od konce kolekce.

Návraty

IEnumerable<TSource>

Nová výčtová kolekce, která obsahuje prvky z source prvků minus count z konce kolekce.

Výjimky

source je null.

Poznámky

Pokud count není kladné číslo, vrátí tato metoda identickou kopii source výčtu kolekce.

Platí pro