ConcurrentDictionary<TKey,TValue>.ICollection<KeyValuePair<TKey,TValue>>.Add Méthode

Définition

Ajoute un élément à la collection.

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

Paramètres

keyValuePair
KeyValuePair<TKey,TValue>

KeyValuePair<TKey,TValue> à ajouter au dictionnaire.

Implémente

Exceptions

Le Key du keyValuePair est null.

Contient Dictionary<TKey,TValue> trop d’éléments.

Un élément possédant la même clé existe déjà dans Dictionary<TKey,TValue>.

S’applique à

Voir aussi