Dictionary<TKey,TValue>.ICollection<KeyValuePair<TKey,TValue>>.CopyTo Metoda

Definicja

Kopiuje elementy do ICollection<T> tablicy typu KeyValuePair<TKey,TValue>, zaczynając od określonego indeksu tablicy.

 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

Parametry

array
KeyValuePair<TKey,TValue>[]

Tablica jednowymiarowa typu KeyValuePair<TKey,TValue> , która jest miejscem docelowym KeyValuePair<TKey,TValue> elementów skopiowanych z obiektu ICollection<T>. Indeksowanie tablicy musi rozpoczynać się od zera.

index
Int32

Numerowany od zera indeks w tablicy array, od którego rozpoczyna się kopiowanie.

Implementuje

Wyjątki

array to null.

index wartość jest mniejsza niż 0.

Liczba elementów w źródle ICollection<T> jest większa niż dostępna przestrzeń od index do końca miejsca docelowego array.

Dotyczy