Share via


Dictionary<TKey,TValue>.KeyCollection Oluşturucu

Tanım

Belirtilen Dictionary<TKey,TValue>içindeki anahtarları yansıtan sınıfının yeni bir örneğini Dictionary<TKey,TValue>.KeyCollection başlatır.

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

Parametreler

dictionary
Dictionary<TKey,TValue>

Dictionary<TKey,TValue> Anahtarları yeni Dictionary<TKey,TValue>.KeyCollectionöğesine yansıtılan .

Özel durumlar

dictionary, null değeridir.

Açıklamalar

Dictionary<TKey,TValue>.KeyCollection statik bir kopya değildir; bunun yerine, Dictionary<TKey,TValue>.KeyCollection özgün Dictionary<TKey,TValue>içindeki anahtarlara geri başvurur. Bu nedenle, dosyasında yapılan Dictionary<TKey,TValue> değişiklikler öğesine Dictionary<TKey,TValue>.KeyCollectionyansıtılmaya devam edilir.

Bu oluşturucu bir O(1) işlemidir.

Şunlara uygulanır