Partager via


DisplayAttribute.GetDescription Method

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Retrieves the localized or non-localized value of the Description property.

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

Syntax

'Declaration
Public Function GetDescription As String
public string GetDescription()

Return Value

Type: System.String
The localized value for the description when the ResourceType property is specified and the Description property represents a resource name; otherwise, the non-localized value specified in the Description property.

Remarks

Do not use the get accessor of the Description property to retrieve the text to display in your Silverlight application. Instead, use the GetDescription method to retrieve the description to display. The GetDescription method returns either the literal non-localized string or the localized string when a resource type has been specified.

Version Information

Silverlight

Supported in: 5, 4, 3

Platforms

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.