ValidationContext.DisplayName 属性
定义
获取或设置要验证的成员的名称。Gets or sets the name of the member to validate.
public:
property System::String ^ DisplayName { System::String ^ get(); void set(System::String ^ value); };
public string DisplayName { get; set; }
member this.DisplayName : string with get, set
Public Property DisplayName As String
属性值
要验证的成员的名称。The name of the member to validate.
注解
DisplayName值为向用户显示的名称。The DisplayName value is the name that is shown to the user. 如果未显式设置显示名称,则此属性将使用由关联对象分配的值 DisplayAttribute 。If a display name is not explicitly set, this property uses the value that is assigned by the associated DisplayAttribute object. 如果该属性不存在,属性将返回属性的值 MemberName 。If that attribute does not exist, the property returns the value of the MemberName property.