SortedDictionary<TKey,TValue>.ValueCollection Constructor

Definition

Initializes a new instance of the SortedDictionary<TKey,TValue>.ValueCollection class that reflects the values in the specified 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))

Parameters

Exceptions

dictionary is null.

Remarks

The SortedDictionary<TKey,TValue>.ValueCollection is not a static copy; instead, the SortedDictionary<TKey,TValue>.ValueCollection refers back to the values in the original SortedDictionary<TKey,TValue>. Therefore, changes to the SortedDictionary<TKey,TValue> continue to be reflected in the SortedDictionary<TKey,TValue>.ValueCollection.

This constructor is an O(1) operation.

Applies to