共用方式為


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

適用於