SortedDictionary<TKey,TValue>.KeyCollection Konstruktor

Definice

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

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

Parametry

Výjimky

dictionary je null.

Poznámky

Není SortedDictionary<TKey,TValue>.KeyCollection statická kopie, SortedDictionary<TKey,TValue>.KeyCollection ale odkazuje zpět na klíče v původním SortedDictionary<TKey,TValue>souboru . Proto se SortedDictionary<TKey,TValue> změny v souboru i nadále projeví v SortedDictionary<TKey,TValue>.KeyCollection.

Tento konstruktor je operace O(1).

Platí pro