ModelStateDictionary.Item Property

Gets or sets the model state that is associated with the specified key in the model-state dictionary.

Namespace:  System.Web.WebPages.Html
Assembly:  System.Web.WebPages (in System.Web.WebPages.dll)

Syntax

'Declaration
Public Default Property Item ( _
    key As String _
) As ModelState 
    Get 
    Set
'Usage
Dim instance As ModelStateDictionary 
Dim key As String 
Dim value As ModelState 

value = instance(key)

instance(key) = value
public ModelState this[
    string key
] { get; set; }
public:
virtual property ModelState^ default[String^ key] {
    ModelState^ get (String^ key) sealed;
    void set (String^ key, ModelState^ value) sealed;
}
abstract Item : ModelState with get, set 
override Item : ModelState with get, set
JScript supports the use of indexed properties, but not the declaration of new ones.

Parameters

Property Value

Type: System.Web.WebPages.Html.ModelState
The model state that is associated with the specified key in the dictionary.

Implements

IDictionary<TKey, TValue>.Item[TKey]

See Also

Reference

ModelStateDictionary Class

System.Web.WebPages.Html Namespace