ReadOnlyDictionary<TKey,TValue>.KeyCollection.ICollection.CopyTo(Array, Int32) Méthode
Définition
Copie les éléments de la collection dans un tableau, en commençant au niveau d'un index de tableau spécifique.Copies the elements of the collection to an array, starting at a specific array index.
virtual void System.Collections.ICollection.CopyTo(Array ^ array, int index) = System::Collections::ICollection::CopyTo;
void ICollection.CopyTo (Array array, int index);
Paramètres
- array
- Array
Tableau unidimensionnel qui constitue la destination des éléments copiés à partir de la collection.The one-dimensional array that is the destination of the elements copied from the collection. Ce tableau doit avoir une indexation de base zéro.The array must have zero-based indexing.
- index
- Int32
Index de base zéro dans l'array
à partir duquel la copie commence.The zero-based index in array
at which copying begins.
Implémente
Exceptions
array
a la valeur null
.array
is null
.
index
est inférieur à 0.index
is less than 0.
array
est multidimensionnel.array
is multidimensional.
- ou --or-
Le nombre d'éléments dans la collection source est supérieur à l'espace disponible entre index
et la fin du array
de destination.The number of elements in the source collection is greater than the available space from index
to the end of the destination array
.
Remarques
Ce membre est une implémentation d'un membre d'interface explicite.This member is an explicit interface member implementation. Il peut uniquement être utilisé lorsque l'instance de ReadOnlyDictionary<TKey,TValue>.KeyCollection est castée en interface ICollection.It can be used only when the ReadOnlyDictionary<TKey,TValue>.KeyCollection instance is cast to an ICollection interface.