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>.

適用於

另請參閱