SortedDictionary<TKey,TValue>.KeyCollection Constructor

Definición

Inicializa una nueva instancia de la clase SortedDictionary<TKey,TValue>.KeyCollection que refleja las claves de la colección SortedDictionary<TKey,TValue> especificada.

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

Parámetros

dictionary
SortedDictionary<TKey,TValue>

Colección SortedDictionary<TKey,TValue> cuyas claves se reflejan en la nueva colección SortedDictionary<TKey,TValue>.KeyCollection.

Excepciones

dictionary es null.

Comentarios

no SortedDictionary<TKey,TValue>.KeyCollection es una copia estática; en su lugar, hace SortedDictionary<TKey,TValue>.KeyCollection referencia a las claves del original SortedDictionary<TKey,TValue>. Por lo tanto, los cambios en el elemento SortedDictionary<TKey,TValue> continúan reflejados en .SortedDictionary<TKey,TValue>.KeyCollection

Este constructor es una operación O(1).

Se aplica a