Share via


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

Definisi

Menyalin elemen ke ICollection<T> array jenis KeyValuePair<TKey,TValue>, dimulai dari indeks array yang ditentukan.

 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

Parameter

array
KeyValuePair<TKey,TValue>[]

Array satu dimensi jenis KeyValuePair<TKey,TValue> yang merupakan tujuan elemen yang KeyValuePair<TKey,TValue> disalin dari ICollection<T>. Array harus memiliki pengindeksan berbasis nol.

index
Int32

Indeks berbasis nol tempat array penyalinan dimulai.

Penerapan

Pengecualian

arrayadalah null.

index kurang dari 0.

Jumlah elemen dalam sumber ICollection<T> lebih besar dari ruang yang tersedia dari index ke akhir tujuan array.

Berlaku untuk