SortedDictionary<TKey,TValue>.KeyCollection Constructor
Definitie
Belangrijk
Bepaalde informatie heeft betrekking op een voorlopige productversie die aanzienlijk kan worden gewijzigd voordat deze wordt uitgebracht. Microsoft biedt geen enkele expliciete of impliciete garanties met betrekking tot de informatie die hier wordt verstrekt.
Initialiseert een nieuw exemplaar van de SortedDictionary<TKey,TValue>.KeyCollection klasse die de sleutels in de opgegeven SortedDictionary<TKey,TValue>klasse weerspiegelt.
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))
Parameters
- dictionary
- SortedDictionary<TKey,TValue>
De SortedDictionary<TKey,TValue> wiens sleutels worden weerspiegeld in de nieuwe SortedDictionary<TKey,TValue>.KeyCollection.
Uitzonderingen
dictionary is null.
Opmerkingen
Het SortedDictionary<TKey,TValue>.KeyCollection is geen statische kopie; in plaats daarvan verwijst de SortedDictionary<TKey,TValue>.KeyCollection waarde terug naar de sleutels in het origineel SortedDictionary<TKey,TValue>. Daarom blijven wijzigingen in de wijzigingen in de SortedDictionary<TKey,TValue>SortedDictionary<TKey,TValue>.KeyCollection.
Deze constructor is een O(1)-bewerking.