ModelBinderDictionary::Add Method
Adds an item to the model binder dictionary.
Assembly: System.Web.Mvc (in System.Web.Mvc.dll)
| Name | Description | |
|---|---|---|
![]() | Add(KeyValuePair<Type^, IModelBinder^>) | Adds the specified item to the model binder dictionary. |
![]() | Add(Type^, IModelBinder^) | Adds the specified item to the model binder dictionary using the specified key. |
ModelBinderDictionary::Add Method (KeyValuePair<Type^, IModelBinder^>)
Adds the specified item to the model binder dictionary.
Parameters
- item
-
Type:
System.Collections.Generic::KeyValuePair<Type^, IModelBinder^>
The object to add to the ICollection<T> instance.
Implements
ICollection<T>::Add(T)| Exception | Condition |
|---|---|
| NotSupportedException | The ICollection<T> object is read-only. |
ModelBinderDictionary::Add Method (Type^, IModelBinder^)
Adds the specified item to the model binder dictionary using the specified key.
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.
| 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. |
Show:
