SortedDictionary<TKey,TValue>.ICollection<KeyValuePair<TKey,TValue>>.Add(KeyValuePair<TKey,TValue>) Metoda

Definicja

Dodaje element do elementu ICollection<T> .Adds an item to the ICollection<T>.

 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>

KeyValuePair<TKey,TValue>Struktura, która ma zostać dodana do programu ICollection<T> .The KeyValuePair<TKey,TValue> structure to add to the ICollection<T>.

Implementuje

Wyjątki

keyValuePair to null.keyValuePair is null.

Element z tym samym kluczem już istnieje w SortedDictionary<TKey,TValue> .An element with the same key already exists in the SortedDictionary<TKey,TValue>.

Dotyczy