Dictionary<TKey,TValue>.ICollection<KeyValuePair<TKey,TValue>>.Add(KeyValuePair<TKey,TValue>) Dictionary<TKey,TValue>.ICollection<KeyValuePair<TKey,TValue>>.Add(KeyValuePair<TKey,TValue>) Dictionary<TKey,TValue>.ICollection<KeyValuePair<TKey,TValue>>.Add(KeyValuePair<TKey,TValue>) Method

定義

指定した値を、指定したキーと共に ICollection<T> に追加します。Adds the specified value to the ICollection<T> with the specified key.

 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);
Sub Add (keyValuePair As KeyValuePair(Of TKey, TValue)) Implements ICollection(Of KeyValuePair(Of TKey, TValue)).Add

パラメーター

keyValuePair
KeyValuePair<TKey,TValue> KeyValuePair<TKey,TValue> KeyValuePair<TKey,TValue>

Dictionary<TKey,TValue> に追加するキーと値を表す KeyValuePair<TKey,TValue> 構造体。The KeyValuePair<TKey,TValue> structure representing the key and value to add to the Dictionary<TKey,TValue>.

実装

例外

keyValuePair のキーは null です。The key of keyValuePair is null.

同じキーを持つ要素が、Dictionary<TKey,TValue> に既に存在します。An element with the same key already exists in the Dictionary<TKey,TValue>.

適用対象