Compartilhar via


ModelBinderDictionary.Add Method (Type, IModelBinder)

Adds the specified item to the model binder dictionary using the specified key.

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

Syntax

'Declaration
Public Sub Add ( _
    key As Type, _
    value As IModelBinder _
)
public void Add(
    Type key,
    IModelBinder value
)
public:
virtual void Add(
    Type^ key, 
    IModelBinder^ value
) sealed

Parameters

Implements

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

Exceptions

Exception Condition
NotSupportedException

The IDictionary<TKey, TValue> object is read-only.

ArgumentNullException

key is null.

ArgumentException

An element that has the same key already exists in the IDictionary<TKey, TValue> object.

See Also

Reference

ModelBinderDictionary Class

Add Overload

System.Web.Mvc Namespace