Share via


CachedModelMetadata<TPrototypeCache>.IsRequired Property

Gets or sets a value that indicates whether the model is required.

Namespace:  System.Web.Mvc
Assembly:  System.Web.Mvc (in System.Web.Mvc.dll)

Syntax

'Declaration
Public Overrides NotOverridable Property IsRequired As Boolean 
    Get 
    Set
'Usage
Dim instance As CachedModelMetadata 
Dim value As Boolean 

value = instance.IsRequired

instance.IsRequired = value
public override sealed bool IsRequired { get; set; }
public:
virtual property bool IsRequired {
    bool get () override sealed;
    void set (bool value) override sealed;
}
abstract IsRequired : bool with get, set 
override IsRequired : bool with get, set
override final function get IsRequired () : boolean 
override final function set IsRequired (value : boolean)

Property Value

Type: System.Boolean
A value that indicates whether the model is required.

Remarks

The getter returns the cached value if it is cached. If the value is not cached, it is put into the cache and returned.

See Also

Reference

CachedModelMetadata<TPrototypeCache> Class

System.Web.Mvc Namespace