SortedDictionary<TKey,TValue>.ValueCollection Konstruktor
Definition
Viktigt
En del information gäller för förhandsversionen av en produkt och kan komma att ändras avsevärt innan produkten blir allmänt tillgänglig. Microsoft lämnar inga garantier, uttryckliga eller underförstådda, avseende informationen som visas här.
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
- dictionary
- SortedDictionary<TKey,TValue>
Vars SortedDictionary<TKey,TValue> värden återspeglas i den nya SortedDictionary<TKey,TValue>.ValueCollection.
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.