語言

SortedDictionary<TKey,TValue>.ValueCollection 建構函式

定義

初始化一個反映指定SortedDictionary<TKey,TValue>.ValueCollection值的類別新實例SortedDictionary<TKey,TValue>。

public:
 ValueCollection(System::Collections::Generic::SortedDictionary<TKey, TValue> ^ dictionary);
public ValueCollection(System.Collections.Generic.SortedDictionary<TKey,TValue> dictionary);
new System.Collections.Generic.SortedDictionary<'Key, 'Value>.ValueCollection : System.Collections.Generic.SortedDictionary<'Key, 'Value> -> System.Collections.Generic.SortedDictionary<'Key, 'Value>.ValueCollection
Public Sub New (dictionary As SortedDictionary(Of TKey, TValue))

參數

例外狀況

dictionary 是 null。

備註

這 SortedDictionary<TKey,TValue>.ValueCollection 不是靜態複製;而是 SortedDictionary<TKey,TValue>.ValueCollection 回溯到原始 SortedDictionary<TKey,TValue>的值。 因此,變化 SortedDictionary<TKey,TValue> 會持續反映在 SortedDictionary<TKey,TValue>.ValueCollection中。

此構造子為 O(1) 運算。

適用於