Catatan
Akses ke halaman ini memerlukan otorisasi. Anda dapat mencoba masuk atau mengubah direktori.
Akses ke halaman ini memerlukan otorisasi. Anda dapat mencoba mengubah direktori.
Adds an element that has the specified key and value to the collection of value providers.
Namespace: System.Web.Mvc
Assembly: System.Web.Mvc (in System.Web.Mvc.dll)
Syntax
'Declaration
Public Sub Add ( _
key As String, _
value As Object _
)
public void Add(
string key,
Object value
)
public:
void Add(
String^ key,
Object^ value
)
Parameters
- key
Type: System.String
The key of the element to add.
- value
Type: System.Object
The value of the element to add.
Exceptions
| Exception | Condition |
|---|---|
| NotSupportedException | The IDictionary<TKey, TValue> object is read-only. |
| ArgumentNullException | key is null. |
| ArgumentException | An element that has the specified key already exists in the IDictionary<TKey, TValue> object. |