ModelStateDictionary.Add Method
Namespace: System.Web.Http.ModelBinding
Assembly: System.Web.Http (in System.Web.Http.dll)
Overload List
Name | Description | |
---|---|---|
Add(KeyValuePair<String, ModelState>) | Adds the specified item to the model-state dictionary. |
|
Add(String, ModelState) | Adds an element that has the specified key and value to the model-state dictionary. |
See Also
ModelStateDictionary Class
System.Web.Http.ModelBinding Namespace
Return to top
ModelStateDictionary.Add Method (KeyValuePair<String, ModelState>)
Adds the specified item to the model-state dictionary.
Syntax
public void Add(
KeyValuePair<string, ModelState> item
)
public:
virtual void Add(
KeyValuePair<String^, ModelState^> item
) sealed
abstract Add :
item:KeyValuePair<string, ModelState> -> unit
override Add :
item:KeyValuePair<string, ModelState> -> unit
Public Sub Add (
item As KeyValuePair(Of String, ModelState)
)
Parameters
item
Type: System.Collections.Generic.KeyValuePair<String, ModelState>The object to add to the model-state dictionary.
Implements
Return to top
ModelStateDictionary.Add Method (String, ModelState)
Adds an element that has the specified key and value to the model-state dictionary.
Syntax
public void Add(
string key,
ModelState value
)
public:
virtual void Add(
String^ key,
ModelState^ value
) sealed
abstract Add :
key:string *
value:ModelState -> unit
override Add :
key:string *
value:ModelState -> unit
Public Sub Add (
key As String,
value As ModelState
)
Parameters
key
Type: System.StringThe key of the element to add.
value
Type: System.Web.Http.ModelBinding.ModelStateThe value of the element to add.
Implements
IDictionary<TKey, TValue>.Add(TKey, TValue)
Return to top