ValidationContext.DisplayName Property


The .NET API Reference documentation has a new home. Visit the .NET API Browser on to see the new experience.

Gets or sets the name of the member to validate.

Namespace:   System.ComponentModel.DataAnnotations
Assembly:  System.ComponentModel.DataAnnotations (in System.ComponentModel.DataAnnotations.dll)

public string DisplayName { get; set; }

Property Value

Type: System.String

The name of the member to validate.

The DisplayName value is the name that is shown to the user. If a display name is not explicitly set, this property uses the value that is assigned by the associated DisplayAttribute object. If that attribute does not exist, the property returns the value of the MemberName property.

Universal Windows Platform
Available since 8
.NET Framework
Available since 4.0
Portable Class Library
Supported in: portable .NET platforms
Available since 3.0
Return to top