Dictionary<TKey,TValue>.ValueCollection Konstruktor

Definice

Inicializuje novou instanci Dictionary<TKey,TValue>.ValueCollection třídy, která odráží hodnoty v zadané 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))

Parametry

dictionary
Dictionary<TKey,TValue>

Hodnota Dictionary<TKey,TValue> , jejíž hodnoty se projeví v nové Dictionary<TKey,TValue>.ValueCollectionhodnotě .

Výjimky

dictionary je null.

Poznámky

Nejedná se Dictionary<TKey,TValue>.ValueCollection o statickou kopii. Dictionary<TKey,TValue>.ValueCollection Místo toho odkazuje na hodnoty v původní Dictionary<TKey,TValue>hodnotě . Proto se Dictionary<TKey,TValue> změny v souboru i nadále promítnou do Dictionary<TKey,TValue>.ValueCollection.

Tento konstruktor je operace O(1).

Platí pro