Enumerable.SkipLast<TSource>(IEnumerable<TSource>, Int32) Método
Definición
Devuelve una nueva colección que contiene los elementos de source
con los últimos elementos de count
de la colección de origen omitida.Returns a new enumerable collection that contains the elements from source
with the last count
elements of the source collection omitted.
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)
Parámetros de tipo
- TSource
Tipo de los elementos de la colección Enumerable.The type of the elements in the enumerable collection.
Parámetros
- source
- IEnumerable<TSource>
Instancia de una colección enumerable.An enumerable collection instance.
- count
- Int32
Número de elementos que se van a omitir desde el final de la colección.The number of elements to omit from the end of the collection.
Devoluciones
- IEnumerable<TSource>
Nueva colección enumerable que contiene los elementos de source
menos los elementos de count
del final de la colección.A new enumerable collection that contains the elements from source
minus count
elements from the end of the collection.
Excepciones
source
es null
.source
is null
.
Comentarios
Si count
no es un número positivo, este método devuelve una copia idéntica de la source
colección Enumerable.If count
is not a positive number, this method returns an identical copy of the source
enumerable collection.