ConcurrentDictionary<TKey,TValue>.ICollection<KeyValuePair<TKey,TValue>>.Add メソッド

定義

項目をコレクションに追加します。

 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

パラメーター

keyValuePair
KeyValuePair<TKey,TValue>

ディクショナリに追加する KeyValuePair<TKey,TValue>

実装

例外

keyValuePairKeynull です。

Dictionary<TKey,TValue> に含まれている要素が多すぎます。

同じキーを持つ要素が、Dictionary<TKey,TValue> に既に存在します。

適用対象

こちらもご覧ください