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

정의

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

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>

컬렉션의 끝에서 빼 count 기 요소의 요소를 source 포함하는 새 열거 가능한 컬렉션입니다.

예외

sourcenull입니다.

설명

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

적용 대상