ModelMetadata.IsRequired Property

.NET Framework (current version)
 

Gets or sets a value that specifies whether the property is required.

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

abstract IsRequired : bool with get, set
override IsRequired : bool with get, set

Property Value

Type: System.Boolean

true if the property is required; otherwise, false. The default is true for non-nullable value types and false for all other types.

.NET Framework
Available since 4.5
Return to top
Show: