Dictionary<TKey,TValue>.ICollection<KeyValuePair<TKey,TValue>>.Add 메서드

정의

지정한 키가 있는 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

매개 변수

keyValuePair
KeyValuePair<TKey,TValue>

Dictionary<TKey,TValue>에 추가할 키와 값을 나타내는 KeyValuePair<TKey,TValue> 구조체입니다.

구현

예외

keyValuePair의 키는 null입니다.

같은 키를 가진 요소가 이미 Dictionary<TKey,TValue>에 있는 경우

적용 대상