CollectionExtensions.InsertRange<T> Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Inserts the elements of a span into the List<T> at the specified index.
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);
public static void InsertRange<T> (this System.Collections.Generic.List<T> list, int index, scoped 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))
Type Parameters
- T
The type of elements in the list.
Parameters
- list
- List<T>
The list into which the elements should be inserted.
- index
- Int32
The zero-based index at which the new elements should be inserted.
- source
- ReadOnlySpan<T>
The span whose elements should be added to the List<T>.
Exceptions
The list
is null
.
index
is less than 0 or greater than list
's Count.
Applies to
Werk met ons samen op GitHub
De bron voor deze inhoud vindt u op GitHub, waar u ook problemen en pull-aanvragen kunt maken en bekijken. Raadpleeg onze gids voor inzenders voor meer informatie.