Export (0) Print
Expand All

ModelMetadata.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)

'Declaration
Public Overridable Property IsRequired As Boolean 
	Get 
	Set
'Usage
Dim instance As ModelMetadata 
Dim value As Boolean 

value = instance.IsRequired

instance.IsRequired = value

Property Value

Type: System.Boolean
true if the model is required; otherwise, false.

The default value for this property is true for non-nullable value types and false for all other types.

Show:
© 2014 Microsoft