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

适用于

另请参阅