ModelStateDictionary.Remove 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
从字典中删除元素。
重载
| 名称 | 说明 |
|---|---|
| Remove(KeyValuePair<String,ModelState>) |
从模型状态字典中删除指定项的第一个匹配项。 |
| Remove(String) |
从字典中删除具有指定键的项。 |
Remove(KeyValuePair<String,ModelState>)
从模型状态字典中删除指定项的第一个匹配项。
public:
virtual bool Remove(System::Collections::Generic::KeyValuePair<System::String ^, System::Web::ModelBinding::ModelState ^> item);
public bool Remove(System.Collections.Generic.KeyValuePair<string,System.Web.ModelBinding.ModelState> item);
abstract member Remove : System.Collections.Generic.KeyValuePair<string, System.Web.ModelBinding.ModelState> -> bool
override this.Remove : System.Collections.Generic.KeyValuePair<string, System.Web.ModelBinding.ModelState> -> bool
Public Function Remove (item As KeyValuePair(Of String, ModelState)) As Boolean
参数
- item
- KeyValuePair<String,ModelState>
要删除的项。
返回
true 如果项已成功从字典中删除,或者 false 该项未移除或未在字典中找到,则为 。
实现
适用于
Remove(String)
从字典中删除具有指定键的项。
public:
virtual bool Remove(System::String ^ key);
public bool Remove(string key);
abstract member Remove : string -> bool
override this.Remove : string -> bool
Public Function Remove (key As String) As Boolean
参数
- key
- String
要删除的项的键。
返回
true 如果项已成功从字典中删除,或者 false 该项未移除或未在字典中找到,则为 。