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
Spolupráca s nami v službe GitHub
Zdroj tohto obsahu nájdete v službe GitHub, kde môžete vytvárať a skúmať problémy a žiadosti o prijatie zmien. Ďalšie informácie nájdete v našom sprievodcovi prispievateľom.