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);
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
Σχόλια
https://aka.ms/ContentUserFeedback.
Σύντομα διαθέσιμα: Καθ' όλη τη διάρκεια του 2024 θα καταργήσουμε σταδιακά τα ζητήματα GitHub ως μηχανισμό ανάδρασης για το περιεχόμενο και θα το αντικαταστήσουμε με ένα νέο σύστημα ανάδρασης. Για περισσότερες πληροφορίες, ανατρέξτε στο θέμα:Υποβολή και προβολή σχολίων για