CollectionExtensions.InsertRange<T> 메서드

정의

범위 List<T> 의 요소를 지정된 인덱스의 에 삽입합니다.

public:
generic <typename T>
[System::Runtime::CompilerServices::Extension]
 static void InsertRange(System::Collections::Generic::List<T> ^ list, int index, ReadOnlySpan<T> source);
public static void InsertRange<T> (this System.Collections.Generic.List<T> list, int index, ReadOnlySpan<T> source);
static member InsertRange : System.Collections.Generic.List<'T> * int * ReadOnlySpan<'T> -> unit
<Extension()>
Public Sub InsertRange(Of T) (list As List(Of T), index As Integer, source As ReadOnlySpan(Of T))

형식 매개 변수

T

목록에 있는 요소의 형식입니다.

매개 변수

list
List<T>

요소를 삽입할 목록입니다.

index
Int32

새 요소가 삽입되어야 하는 0부터 시작하는 인덱스입니다.

source
ReadOnlySpan<T>

요소를 에 추가해야 하는 범위입니다 List<T>.

예외

listnull입니다.

index가 0보다 작거나 의 Count보다 list큰 경우

적용 대상