ConcurrentDictionary<TKey,TValue>.ICollection<KeyValuePair<TKey,TValue>>.Add(KeyValuePair<TKey,TValue>) Método

Definição

Adiciona um item à coleção.Adds an item to the 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

Parâmetros

keyValuePair
KeyValuePair<TKey,TValue>

O KeyValuePair<TKey,TValue> a ser adicionado ao dicionário.The KeyValuePair<TKey,TValue> to add to the dictionary.

Implementações

Exceções

O Key de keyValuePair é null.The Key of keyValuePair is null.

O Dictionary<TKey,TValue> contém muitos elementos.The Dictionary<TKey,TValue> contains too many elements.

Já existe um elemento com a mesma chave no Dictionary<TKey,TValue>.An element with the same key already exists in the Dictionary<TKey,TValue>.

Aplica-se a