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

参数

例外

dictionarynull

注解

SortedDictionary<TKey,TValue>.ValueCollection不是静态副本;SortedDictionary<TKey,TValue>.ValueCollection而是引用原始 SortedDictionary<TKey,TValue>中的值。 因此,对 SortedDictionary<TKey,TValue> 的更改将继续反映在 中 SortedDictionary<TKey,TValue>.ValueCollection

此构造函数是 O (1) 操作。

适用于