Sdílet prostřednictvím


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

Definice

Přidá položku do 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>

Struktura KeyValuePair<TKey,TValue> , která se má přidat do objektu ICollection<T>.

Implementuje

Výjimky

keyValuePair je null.

Prvek se stejným klíčem již existuje v objektu SortedDictionary<TKey,TValue>.

Platí pro