List<T>.Slice(Int32, Int32) 메서드

정의

소스 List<T>에 있는 일련의 요소에 대한 단순 복사본을 만듭니다.

public:
 System::Collections::Generic::List<T> ^ Slice(int start, int length);
public System.Collections.Generic.List<T> Slice (int start, int length);
member this.Slice : int * int -> System.Collections.Generic.List<'T>
Public Function Slice (start As Integer, length As Integer) As List(Of T)

매개 변수

start
Int32

범위가 시작되는 List<T> 인덱스(0부터 시작)입니다.

length
Int32

범위의 길이입니다.

반환

소스 List<T>에 있는 일련의 요소에 대한 단순 복사본입니다.

예외

start 가 0보다 작습니다.

또는

length 가 0보다 작습니다.

startlengthList<T>에서 올바른 요소 범위를 나타내지 않습니다.

적용 대상