ModelBinderDictionary::Remove Method
Removes the element that has the specified key from the model binder dictionary.
Assembly: System.Web.Mvc (in System.Web.Mvc.dll)
| Name | Description | |
|---|---|---|
![]() | Remove(KeyValuePair<Type^, IModelBinder^>) | Removes the first occurrence of the specified element from the model binder dictionary. |
![]() | Remove(Type^) | Removes the element that has the specified key from the model binder dictionary. |
ModelBinderDictionary::Remove Method (KeyValuePair<Type^, IModelBinder^>)
Removes the first occurrence of the specified element from the model binder dictionary.
Parameters
- item
-
Type:
System.Collections.Generic::KeyValuePair<Type^, IModelBinder^>
The object to remove from the ICollection<T> object.
Return Value
Type: System::Booleantrue if item was successfully removed from the model binder dictionary; otherwise, false. This method also returns false if item is not found in the model binder dictionary.
Implements
ICollection<T>::Remove(T)| Exception | Condition |
|---|---|
| NotSupportedException | The ICollection<T> object is read-only. |
ModelBinderDictionary::Remove Method (Type^)
Removes the element that has the specified key from the model binder dictionary.
Parameters
- key
-
Type:
System::Type^
The key of the element to remove.
Return Value
Type: System::Booleantrue if the element is successfully removed; otherwise, false. This method also returns false if key was not found in the model binder dictionary.
Implements
IDictionary<TKey, TValue>::Remove(TKey)| Exception | Condition |
|---|---|
| NotSupportedException | The IDictionary<TKey, TValue> object is read-only. |
| ArgumentNullException | key is null. |
