ValueProviderDictionary.Add Method (String, Object)

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 _
)
'Usage
Dim instance As ValueProviderDictionary 
Dim key As String 
Dim value As Object

instance.Add(key, value)
public void Add(
    string key,
    Object value
)
public:
void Add(
    String^ key, 
    Object^ value
)
member Add : 
        key:string * 
        value:Object -> unit
public function Add(
    key : String, 
    value : Object
)

Parameters

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.

See Also

Reference

ValueProviderDictionary Class

Add Overload

System.Web.Mvc Namespace