Dictionary<TKey,TValue>.KeyCollection Konstruktor

Definition

Initialisiert eine neue Instanz der Dictionary<TKey,TValue>.KeyCollection-Klasse, die die Schlüssel im angegebenen Dictionary<TKey,TValue> angibt.

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))

Parameter

dictionary
Dictionary<TKey,TValue>

Das Dictionary<TKey,TValue>, dessen Schlüssel in der neuen Dictionary<TKey,TValue>.KeyCollection angegeben werden.

Ausnahmen

dictionary ist null.

Hinweise

ist Dictionary<TKey,TValue>.KeyCollection keine statische Kopie, Dictionary<TKey,TValue>.KeyCollection sondern verweist auf die Schlüssel im ursprünglichen Dictionary<TKey,TValue>. Daher werden Änderungen am Dictionary<TKey,TValue> weiterhin im widerzuspiegeln Dictionary<TKey,TValue>.KeyCollection.

Dieser Konstruktor ist ein O(1)-Vorgang.

Gilt für: