Dictionary<TKey,TValue>.ValueCollection(Dictionary<TKey,TValue>) Dictionary<TKey,TValue>.ValueCollection(Dictionary<TKey,TValue>) Dictionary<TKey,TValue>.ValueCollection(Dictionary<TKey,TValue>) Dictionary<TKey,TValue>.ValueCollection(Dictionary<TKey,TValue>) Constructor

Definition

Initializes a new instance of the Dictionary<TKey,TValue>.ValueCollection class that reflects the values in the specified Dictionary<TKey,TValue>.

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

Parameters

Exceptions

Remarks

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

This constructor is an O(1) operation.

Applies to