ConcurrentDictionary<TKey,TValue>.ToArray ConcurrentDictionary<TKey,TValue>.ToArray ConcurrentDictionary<TKey,TValue>.ToArray ConcurrentDictionary<TKey,TValue>.ToArray Method

定义

ConcurrentDictionary<TKey,TValue> 中存储的键和值对复制到新数组中。 Copies the key and value pairs stored in the ConcurrentDictionary<TKey,TValue> to a new array.

public:
 cli::array <System::Collections::Generic::KeyValuePair<TKey, TValue>> ^ ToArray();
public System.Collections.Generic.KeyValuePair<TKey,TValue>[] ToArray ();
member this.ToArray : unit -> System.Collections.Generic.KeyValuePair<'Key, 'Value>[]
Public Function ToArray () As KeyValuePair(Of TKey, TValue)()
返回
KeyValuePair<TKey,TValue>[]

一个新数组,其中包含从 ConcurrentDictionary<TKey,TValue> 复制的键和值对的快照。 A new array containing a snapshot of key and value pairs copied from the ConcurrentDictionary<TKey,TValue>.

适用于

另请参阅