ReadOnlyDictionary<TKey,TValue>.ICollection<KeyValuePair<TKey,TValue>>.CopyTo 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.
Copie les éléments du dictionnaire dans un tableau, en commençant au niveau de l’index de tableau spécifié.
virtual void System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<TKey,TValue>>.CopyTo(cli::array <System::Collections::Generic::KeyValuePair<TKey, TValue>> ^ array, int arrayIndex) = System::Collections::Generic::ICollection<System::Collections::Generic::KeyValuePair<TKey, TValue>>::CopyTo;
void ICollection<KeyValuePair<TKey,TValue>>.CopyTo (System.Collections.Generic.KeyValuePair<TKey,TValue>[] array, int arrayIndex);
abstract member System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<TKey,TValue>>.CopyTo : System.Collections.Generic.KeyValuePair<'Key, 'Value>[] * int -> unit
override this.System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<TKey,TValue>>.CopyTo : System.Collections.Generic.KeyValuePair<'Key, 'Value>[] * int -> unit
Sub CopyTo (array As KeyValuePair(Of TKey, TValue)(), arrayIndex As Integer) Implements ICollection(Of KeyValuePair(Of TKey, TValue)).CopyTo
Paramètres
- array
- KeyValuePair<TKey,TValue>[]
Tableau unidimensionnel qui constitue la destination des éléments copiés à partir du dictionnaire. Ce tableau doit avoir une indexation de base zéro.
- arrayIndex
- Int32
Index de base zéro dans l'array
à partir duquel la copie commence.
Implémente
Exceptions
array
a la valeur null
.
arrayIndex
est inférieur à 0.
array
est multidimensionnel.
- ou -
Le nombre d’éléments dans le dictionnaire source est supérieur à la quantité d’espace disponible entre arrayIndex
et la fin du array
de destination.
- ou -
Le type T
ne peut pas être casté automatiquement en type du array
de destination.
S’applique à
Commentaires
https://aka.ms/ContentUserFeedback.
Bientôt disponible : Tout au long de l’année 2024, nous abandonnerons progressivement le mécanisme de retour d’information GitHub Issues pour le remplacer par un nouveau système de commentaires. Pour plus d’informations, consultez :Soumettre et afficher des commentaires pour