ModelStateDictionary.Add 方法

定義

多載

Add(KeyValuePair<String,ModelState>)

將指定的項目加入至模型狀態字典。

Add(String, ModelState)

將具有指定索引鍵和值的項目加入至模型狀態字典。

Add(KeyValuePair<String,ModelState>)

將指定的項目加入至模型狀態字典。

public void Add (System.Collections.Generic.KeyValuePair<string,System.Web.WebPages.Html.ModelState> item);
abstract member Add : System.Collections.Generic.KeyValuePair<string, System.Web.WebPages.Html.ModelState> -> unit
override this.Add : System.Collections.Generic.KeyValuePair<string, System.Web.WebPages.Html.ModelState> -> unit
Public Sub Add (item As KeyValuePair(Of String, ModelState))

參數

item
KeyValuePair<String,ModelState>

要加入至模型狀態字典的項目。

實作

適用於

Add(String, ModelState)

將具有指定索引鍵和值的項目加入至模型狀態字典。

public void Add (string key, System.Web.WebPages.Html.ModelState value);
abstract member Add : string * System.Web.WebPages.Html.ModelState -> unit
override this.Add : string * System.Web.WebPages.Html.ModelState -> unit
Public Sub Add (key As String, value As ModelState)

參數

key
String

索引鍵。

value
ModelState

數值。

實作

適用於