ConcurrentDictionary<TKey,TValue>.ICollection<KeyValuePair<TKey,TValue>>.CopyTo 方法

定义

从指定的数组索引处开始,将数组 ICollection 的元素复制到数组。

 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

参数

array
KeyValuePair<TKey,TValue>[]

一维数组,它是从中 ICollection复制的元素的目标。 数组必须具有从零开始的索引。

index
Int32

从零开始复制的索引 array

实现

例外

arraynull

index 小于 0。

index 等于或大于 array

-或-

ICollection中的元素数大于目标indexarray末尾的可用空间。

适用于

另请参阅