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

Definição

Adiciona um item à coleção.

 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>

A KeyValuePair<TKey,TValue> acrescentar ao dicionário.

Implementações

Exceções

O Key de keyValuePair é null.

Contém Dictionary<TKey,TValue> demasiados elementos.

Um elemento com a mesma chave já existe no Dictionary<TKey,TValue>.

Aplica-se a

Ver também