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)

'Declaration
Public Sub Add ( _
	key As Type, _
	value As IModelBinder _
)
'Usage
Dim instance As ModelBinderDictionary 
Dim key As Type 
Dim value As IModelBinder

instance.Add(key, value)

Parameters

key
Type: System.Type

The key of the element to add.

value
Type: System.Web.Mvc.IModelBinder

The value of the element to add.

Implements

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

ExceptionCondition
NotSupportedException

The IDictionary(Of TKey, TValue) object is read-only.

ArgumentNullException

key is null.

ArgumentException

An element that has the same key already exists in the IDictionary(Of TKey, TValue) object.

Show: