ValueProviderDictionary.Add Method (String, ValueProviderResult)

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)

public final function Add(
	key : String, 
	value : ValueProviderResult
)

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.

Implements

IDictionary(TKey, TValue).Add(TKey, TValue)

ExceptionCondition
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.

Show: