DataAnnotationsModelValidatorProvider.AddImplicitRequiredAttributeForValueTypes 属性

定义

获取或设置一个值,该值指示是否需要不可以为 null 的值类型。

public:
 static property bool AddImplicitRequiredAttributeForValueTypes { bool get(); void set(bool value); };
public static bool AddImplicitRequiredAttributeForValueTypes { get; set; }
static member AddImplicitRequiredAttributeForValueTypes : bool with get, set
Public Shared Property AddImplicitRequiredAttributeForValueTypes As Boolean

属性值

如果需要不可以为 null 的值类型,则为 true;否则为 false

适用于