CollectionExtensions.InsertRange<T> Méthode
Définition
Important
Certaines informations portent sur la préversion du produit qui est susceptible d’être en grande partie modifiée avant sa publication. Microsoft exclut toute garantie, expresse ou implicite, concernant les informations fournies ici.
Insère les éléments d’une étendue dans l’index List<T> spécifié.
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, scoped 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))
Paramètres de type
- T
Type d’éléments dans la liste.
Paramètres
- list
- List<T>
Liste dans laquelle les éléments doivent être insérés.
- index
- Int32
Index de base zéro auquel les nouveaux éléments doivent être insérés.
- source
- ReadOnlySpan<T>
Étendue dont les éléments doivent être ajoutés au List<T>.
Exceptions
list a la valeur null.
index est inférieur à 0 ou supérieur à list's Count.