Dictionary<TKey,TValue>.KeyCollection Konstruktor
Definice
Důležité
Některé informace platí pro předběžně vydaný produkt, který se může zásadně změnit, než ho výrobce nebo autor vydá. Microsoft neposkytuje žádné záruky, výslovné ani předpokládané, týkající se zde uváděných informací.
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
- dictionary
- Dictionary<TKey,TValue>
Jejíž Dictionary<TKey,TValue> klíče se projeví v nové Dictionary<TKey,TValue>.KeyCollection.
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).