Udostępnij za pośrednictwem


ConcurrentDictionary<TKey,TValue>.ICollection<KeyValuePair<TKey,TValue>>.Add Metoda

Definicja

Dodaje element do kolekcji.

 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

Parametry

keyValuePair
KeyValuePair<TKey,TValue>

Element KeyValuePair<TKey,TValue> do dodania do słownika.

Implementuje

Wyjątki

Wartość typu KeykeyValuePair to null.

Zawiera Dictionary<TKey,TValue> zbyt wiele elementów.

Element o tym samym kluczu już istnieje w pliku Dictionary<TKey,TValue>.

Dotyczy

Zobacz też