ValueProviderDictionary.Add Method

 

Adds an item to the collection of value providers.

Namespace:   System.Web.Mvc
Assembly:  System.Web.Mvc (in System.Web.Mvc.dll)

NameDescription
System_CAPS_pubmethodAdd(KeyValuePair<String, ValueProviderResult>)

Adds the specified item to the collection of value providers.

System_CAPS_pubmethodAdd(String, Object)

Adds an element that has the specified key and value to the collection of value providers.

System_CAPS_pubmethodAdd(String, ValueProviderResult)

Adds an element that has the specified key and value to the collection of value providers.

Return to top

ValueProviderDictionary.Add Method (KeyValuePair<String, ValueProviderResult>)

Adds the specified item to the collection of value providers.

public void Add(
	KeyValuePair<string, ValueProviderResult> item
)

Parameters

item
Type: System.Collections.Generic.KeyValuePair<StringValueProviderResult>

The object to add to the ICollection<T> object.

Exception Condition
NotSupportedException

The ICollection<T> object is read-only.

Return to top

ValueProviderDictionary.Add Method (String, Object)

Adds an element that has the specified key and value to the collection of value providers.

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.

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.

Return to top

ValueProviderDictionary.Add Method (String, ValueProviderResult)

Adds an element that has the specified key and value to the collection of value providers.

public void Add(
	string key,
	ValueProviderResult value
)

Parameters

key
Type: System.String

The key of the element to add.

value
Type: System.Web.Mvc.ValueProviderResult

The value of the element to add.

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.

Return to top
Show: