SortedDictionary<TKey,TValue>.KeyCollection Konstruktor

Definisi

Menginisialisasi instans SortedDictionary<TKey,TValue>.KeyCollection baru kelas yang mencerminkan kunci dalam yang ditentukan SortedDictionary<TKey,TValue>.

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

Parameter

Pengecualian

dictionaryadalah null.

Keterangan

SortedDictionary<TKey,TValue>.KeyCollection bukan salinan statis; sebaliknya, SortedDictionary<TKey,TValue>.KeyCollection mengacu kembali ke kunci di aslinya SortedDictionary<TKey,TValue>. Oleh karena itu, perubahan pada SortedDictionary<TKey,TValue> terus tercermin dalam SortedDictionary<TKey,TValue>.KeyCollection.

Konstruktor ini adalah operasi O(1).

Berlaku untuk