Dictionary<TKey,TValue>.KeyCollection Konstruktor

Definice

Inicializuje novou instanci Dictionary<TKey,TValue>.KeyCollection třídy, která odráží klíče v zadané Dictionary<TKey,TValue>.

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

Parametry

Výjimky

dictionary je null.

Poznámky

Nejedná se o statickou kopii. Dictionary<TKey,TValue>.KeyCollection Místo Dictionary<TKey,TValue>.KeyCollection toho odkazuje zpět na klíče v původním Dictionary<TKey,TValue>souboru . Proto se změny nadále Dictionary<TKey,TValue> projeví v Dictionary<TKey,TValue>.KeyCollectionsouboru .

Tento konstruktor je operace O(1).

Platí pro