Compartilhar via


ChoiceDescription.Label Property

Definition

Gets a short, human-presentable message to describe and identify the choice. Think Button label.

public:
 property System::String ^ Label { System::String ^ get(); };
public:
 property Platform::String ^ Label { Platform::String ^ get(); };
public string Label { get; }
member this.Label : string
Public ReadOnly Property Label As String

Property Value

Remarks

Note that the special character & (ampersand) may be embedded in the label string to identify the next character in the label as a "hot key" (aka "keyboard accelerator") that the Console.PromptForChoice implementation may use to allow the user to quickly set input focus to this choice. The implementation of PromptForChoice(String, String, Collection<ChoiceDescription>, Int32) is responsible for parsing the label string for this special character and rendering it accordingly.

For examples, a choice named "Yes to All" might have "Yes to &All" as it's label.

Applies to