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

Definicja

Zwraca nową kolekcję wyliczalną zawierającą elementy z source ostatnich count elementów kolekcji źródłowej pominiętą.

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 elementów w kolekcji wyliczalnej.

Parametry

source
IEnumerable<TSource>

Wyliczalne wystąpienie kolekcji.

count
Int32

Liczba elementów do pominięcia z końca kolekcji.

Zwraca

IEnumerable<TSource>

Nowa kolekcja z możliwością wyliczania zawierająca elementy z source minus count elementów z końca kolekcji.

Wyjątki

source to null.

Uwagi

Jeśli count nie jest liczbą dodatnią, ta metoda zwraca identyczną kopię source kolekcji wyliczalnej.

Dotyczy