SortedDictionary<TKey,TValue>.ValueCollection Konstruktor

Definition

Initierar en ny instans av SortedDictionary<TKey,TValue>.ValueCollection klassen som återspeglar värdena i den angivna SortedDictionary<TKey,TValue>.

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

Parametrar

Undantag

dictionary är null.

Kommentarer

SortedDictionary<TKey,TValue>.ValueCollection är inte en statisk kopia, utan refererar i stället SortedDictionary<TKey,TValue>.ValueCollection tillbaka till värdena i den ursprungliga SortedDictionary<TKey,TValue>. Därför fortsätter ändringarna att SortedDictionary<TKey,TValue> återspeglas i SortedDictionary<TKey,TValue>.ValueCollection.

Den här konstruktorn är en O(1)-åtgärd.

Gäller för