ConcurrentDictionary<TKey,TValue>.ToArray 方法

定义

将存储在新数组中的 ConcurrentDictionary<TKey,TValue> 键和值对复制到新数组。

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>复制的键和值对的快照。

适用于

另请参阅