ReadOnlyDictionary<TKey,TValue>.IDictionary<TKey,TValue>.Add(TKey, TValue) ReadOnlyDictionary<TKey,TValue>.IDictionary<TKey,TValue>.Add(TKey, TValue) ReadOnlyDictionary<TKey,TValue>.IDictionary<TKey,TValue>.Add(TKey, TValue) Method

定義

在所有情況下都會擲回 NotSupportedException 例外狀況。Throws a NotSupportedException exception in all cases.

 virtual void System.Collections.Generic.IDictionary<TKey,TValue>.Add(TKey key, TValue value) = System::Collections::Generic::IDictionary<TKey, TValue>::Add;
void IDictionary<TKey,TValue>.Add (TKey key, TValue value);
Sub Add (key As TKey, value As TValue) Implements IDictionary(Of TKey, TValue).Add

參數

key
TKey TKey TKey

做為要加入項目之索引鍵的物件。The object to use as the key of the element to add.

value
TValue TValue TValue

做為要加入項目之值的物件。The object to use as the value of the element to add.

實作

例外狀況

適用於