共用方式為


ModelStateDictionary.Contains(KeyValuePair<String,ModelState>) 方法

定義

判斷模型狀態字典是否包含特定項目。

public:
 virtual bool Contains(System::Collections::Generic::KeyValuePair<System::String ^, System::Web::ModelBinding::ModelState ^> item);
public bool Contains (System.Collections.Generic.KeyValuePair<string,System.Web.ModelBinding.ModelState> item);
abstract member Contains : System.Collections.Generic.KeyValuePair<string, System.Web.ModelBinding.ModelState> -> bool
override this.Contains : System.Collections.Generic.KeyValuePair<string, System.Web.ModelBinding.ModelState> -> bool
Public Function Contains (item As KeyValuePair(Of String, ModelState)) As Boolean

參數

item
KeyValuePair<String,ModelState>

要在模型狀態字典中尋找的項目。

傳回

Boolean

如果在字典中找到 item 則為 true,否則為 false

實作

適用於