ModelBinderDictionary.Remove 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
Remove(KeyValuePair<Type,IModelBinder>) |
从模型联编程序字典中移除指定元素的第一个匹配项。 |
Remove(Type) |
从模型联编程序字典中移除具有指定键的元素。 |
Remove(KeyValuePair<Type,IModelBinder>)
从模型联编程序字典中移除指定元素的第一个匹配项。
public bool Remove(System.Collections.Generic.KeyValuePair<Type,System.Web.Mvc.IModelBinder> item);
abstract member Remove : System.Collections.Generic.KeyValuePair<Type, System.Web.Mvc.IModelBinder> -> bool
override this.Remove : System.Collections.Generic.KeyValuePair<Type, System.Web.Mvc.IModelBinder> -> bool
Public Function Remove (item As KeyValuePair(Of Type, IModelBinder)) As Boolean
参数
- item
- KeyValuePair<Type,IModelBinder>
要从 对象中删除的对象 ICollection<T> 。
返回
如果 已成功从模型绑定器字典中删除,则 item
为 true;否则为 false。 如果在 item
模型绑定器字典中找不到 ,则此方法也返回 false。
实现
例外
ICollection<T> 对象是只读的。
适用于
Remove(Type)
从模型联编程序字典中移除具有指定键的元素。
public bool Remove(Type key);
abstract member Remove : Type -> bool
override this.Remove : Type -> bool
Public Function Remove (key As Type) As Boolean
参数
- key
- Type
要移除的元素的键。
返回
如果成功移除了该元素,则为 true;否则为 false。 如果在 key
模型绑定器字典中找不到 ,则此方法也返回 false。
实现
例外
key
为 null。