ReadOnlyDictionary<TKey,TValue>.ICollection<KeyValuePair<TKey,TValue>>.Add(KeyValuePair<TKey,TValue>) 方法

定义

在所有情况下都会引发 NotSupportedException 异常。Throws a NotSupportedException exception in all cases.

 virtual void System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<TKey,TValue>>.Add(System::Collections::Generic::KeyValuePair<TKey, TValue> item) = System::Collections::Generic::ICollection<System::Collections::Generic::KeyValuePair<TKey, TValue>>::Add;
void ICollection<KeyValuePair<TKey,TValue>>.Add (System.Collections.Generic.KeyValuePair<TKey,TValue> item);
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 (item As KeyValuePair(Of TKey, TValue)) Implements ICollection(Of KeyValuePair(Of TKey, TValue)).Add

参数

item
KeyValuePair<TKey,TValue>

要添加到字典中的对象。The object to add to the dictionary.

实现

例外

在所有情况下。In all cases.

适用于