ModelStateDictionary.Remove 方法

定義

從字典中移除一個元素。

多載

名稱 Description
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 是該項目未被移除或未在字典中找到。

實作

適用於