SrgsToken.Text Property

 
System_CAPS_noteNote

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

Gets or sets the written form of the word that should be spoken.

Namespace:   System.Speech.Recognition.SrgsGrammar
Assembly:  System.Speech (in System.Speech.dll)

public string Text { get; set; }

Property Value

Type: System.String

The text contained within the SrgsToken class instance.

Exception Condition
ArgumentNullException

An attempt is made to set Text to null.

ArgumentOutOfRangeException

An attempt is made to assign an empty string to Text.

ArgumentException

An attempt is made to assign a string that contains a quotation mark (") to Text.

Although they typically represent the same value, the Text form may be different than the Display form for a word or phrase in a SrgsToken. For example, the Display form may be an acronym, such as “USA”, while the text that will be spoken, and to which the Pronunciation applies, is “United States of America”.

The default value for the Text property is an empty string—"".

.NET Framework
Available since 3.0
Return to top
Show: