SortedDictionary<TKey,TValue>.ValueCollection Constructor

Definición

Inicializa una nueva instancia de la clase SortedDictionary<TKey,TValue>.ValueCollection que refleja los valores de la colección SortedDictionary<TKey,TValue> especificada.

public:
 ValueCollection(System::Collections::Generic::SortedDictionary<TKey, TValue> ^ dictionary);
public ValueCollection (System.Collections.Generic.SortedDictionary<TKey,TValue> dictionary);
new System.Collections.Generic.SortedDictionary<'Key, 'Value>.ValueCollection : System.Collections.Generic.SortedDictionary<'Key, 'Value> -> System.Collections.Generic.SortedDictionary<'Key, 'Value>.ValueCollection
Public Sub New (dictionary As SortedDictionary(Of TKey, TValue))

Parámetros

dictionary
SortedDictionary<TKey,TValue>

Colección SortedDictionary<TKey,TValue> cuyos valores se reflejan en la nueva colección SortedDictionary<TKey,TValue>.ValueCollection.

Excepciones

dictionary es null.

Comentarios

no SortedDictionary<TKey,TValue>.ValueCollection es una copia estática; en su lugar, SortedDictionary<TKey,TValue>.ValueCollection hace referencia a los valores del original SortedDictionary<TKey,TValue>. Por lo tanto, los cambios en el SortedDictionary<TKey,TValue> objeto se seguirán reflejando en SortedDictionary<TKey,TValue>.ValueCollection.

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

Se aplica a