DisplayAttribute.GetPrompt Method

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

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


Public Function GetPrompt As String
public string GetPrompt()

Return Value

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


Do not use the get accessor of the Prompt property to retrieve the text to display in your Silverlight application. Instead, use the GetPrompt method to retrieve the prompt to display. The GetPrompt method returns either the literal non-localized string or the localized string when a resource type is specified.

Version Information


Supported in: 5, 4, 3


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