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

Definition

Lägger till ett objekt i 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

Parametrar

keyValuePair
KeyValuePair<TKey,TValue>

Strukturen KeyValuePair<TKey,TValue> som ska läggas till i ICollection<T>.

Implementeringar

Undantag

keyValuePair är null.

Det finns redan ett element med samma nyckel i SortedDictionary<TKey,TValue>.

Gäller för