Język

SortedDictionary<TKey,TValue>.KeyCollection Konstruktor

Definicja

Inicjuje nowe wystąpienie SortedDictionary<TKey,TValue>.KeyCollection 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>

Którego SortedDictionary<TKey,TValue> klucze są odzwierciedlone w nowym SortedDictionary<TKey,TValue>.KeyCollectionobiekcie .

Wyjątki

Parametr dictionary ma wartość null.

Uwagi

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

Ten konstruktor jest operacją O(1).

Dotyczy