Dictionary<TKey,TValue>.ICollection<KeyValuePair<TKey,TValue>>.CopyTo Méthode

Définition

Copie les éléments du ICollection<T> tableau dans un tableau de type KeyValuePair<TKey,TValue>, en commençant à 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 index) = 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 index);
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)(), index As Integer) Implements ICollection(Of KeyValuePair(Of TKey, TValue)).CopyTo

Paramètres

array
KeyValuePair<TKey,TValue>[]

Tableau unidimensionnel de type KeyValuePair<TKey,TValue> qui est la destination des KeyValuePair<TKey,TValue> éléments copiés à partir du ICollection<T>. Le tableau doit avoir une indexation de base zéro.

index
Int32

Index de base zéro dans array lequel la copie commence.

Implémente

Exceptions

array a la valeur null.

index est inférieur à 0.

Le nombre d’éléments de la source ICollection<T> est supérieur à l’espace disponible de index la fin de la destination array.

S’applique à