Dictionary<TKey,TValue>.ICollection<KeyValuePair<TKey,TValue>>.Add(KeyValuePair<TKey,TValue>) Dictionary<TKey,TValue>.ICollection<KeyValuePair<TKey,TValue>>.Add(KeyValuePair<TKey,TValue>) Dictionary<TKey,TValue>.ICollection<KeyValuePair<TKey,TValue>>.Add(KeyValuePair<TKey,TValue>) Method

Définition

Ajoute la valeur spécifiée à ICollection<T> avec la clé spécifiée.Adds the specified value to the ICollection<T> with the specified key.

 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);
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> KeyValuePair<TKey,TValue>

Structure KeyValuePair<TKey,TValue> qui représente la clé et la valeur à ajouter à Dictionary<TKey,TValue>.The KeyValuePair<TKey,TValue> structure representing the key and value to add to the Dictionary<TKey,TValue>.

Implémente

Exceptions

La clé de keyValuePair a la valeur null.The key of keyValuePair is null.

Un élément possédant la même clé existe déjà dans Dictionary<TKey,TValue>.An element with the same key already exists in the Dictionary<TKey,TValue>.

S’applique à