Enumerable.SkipLast<TSource>(IEnumerable<TSource>, Int32) 메서드

정의

소스 컬렉션의 마지막 count 요소가 생략된 source의 요소를 포함하는 열거 가능한 새 컬렉션을 반환합니다.

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)

형식 매개 변수

TSource

열거 가능한 컬렉션에 있는 요소의 형식입니다.

매개 변수

source
IEnumerable<TSource>

열거 가능한 컬렉션 인스턴스입니다.

count
Int32

컬렉션 끝에서 생략할 요소 수입니다.

반환

IEnumerable<TSource>

source의 요소에서 컬렉션 끝의 count 요소를 뺀 열거 가능한 새 컬렉션입니다.

예외

source이(가) null인 경우

설명

count 양수가 아니면 이 메서드는 열거 가능한 컬렉션의 동일한 복사본을 source 반환합니다.

적용 대상