ConcurrentDictionary<TKey,TValue>.IDictionary<TKey,TValue>.Add Metod

Definition

Lägger till den angivna nyckeln och värdet i IDictionary<TKey,TValue>.

 virtual void System.Collections.Generic.IDictionary<TKey,TValue>.Add(TKey key, TValue value) = System::Collections::Generic::IDictionary<TKey, TValue>::Add;
void IDictionary<TKey,TValue>.Add(TKey key, TValue value);
abstract member System.Collections.Generic.IDictionary<TKey,TValue>.Add : 'Key * 'Value -> unit
override this.System.Collections.Generic.IDictionary<TKey,TValue>.Add : 'Key * 'Value -> unit
Sub Add (key As TKey, value As TValue) Implements IDictionary(Of TKey, TValue).Add

Parametrar

key
TKey

Det objekt som ska användas som nyckel för det element som ska läggas till.

value
TValue

Det objekt som ska användas som värde för elementet som ska läggas till.

Implementeringar

Undantag

key är null.

Det finns redan ett element med samma nyckel i ConcurrentDictionary<TKey,TValue>.

Ordlistan innehåller för många element.

Gäller för

Se även