SortedDictionary<TKey,TValue>.ValueCollection 构造函数
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
初始化类的新实例,该实例 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
- SortedDictionary<TKey,TValue>
其 SortedDictionary<TKey,TValue> 值反映在新 SortedDictionary<TKey,TValue>.ValueCollection中。
例外
dictionary 是 null。
注解
这不是 SortedDictionary<TKey,TValue>.ValueCollection 静态副本;而是 SortedDictionary<TKey,TValue>.ValueCollection 引用原始 SortedDictionary<TKey,TValue>副本中的值。 因此,对 SortedDictionary<TKey,TValue> 继续所做的更改将反映在中 SortedDictionary<TKey,TValue>.ValueCollection。
此构造函数是 O(1) 操作。