SortedDictionary<TKey,TValue>.KeyCollection Konstruktor

Definicja

Inicjuje SortedDictionary<TKey,TValue>.KeyCollection nowe wystąpienie klasy, które odzwierciedla klucze w określonym SortedDictionary<TKey,TValue>obiekcie .

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

dictionary
SortedDictionary<TKey,TValue>

Klucze SortedDictionary<TKey,TValue> , których klucze są odzwierciedlone w nowym SortedDictionary<TKey,TValue>.KeyCollectionobiekcie .

Wyjątki

dictionary to null.

Uwagi

Element SortedDictionary<TKey,TValue>.KeyCollection nie jest kopią statyczną. SortedDictionary<TKey,TValue>.KeyCollection Zamiast tego element odwołuje się do kluczy w oryginalnym SortedDictionary<TKey,TValue>pliku . W związku z SortedDictionary<TKey,TValue> tym zmiany w obiekcie nadal będą odzwierciedlane w pliku SortedDictionary<TKey,TValue>.KeyCollection.

Ten konstruktor jest operacją O(1).

Dotyczy