SrgsText 构造函数

定义

初始化 SrgsText 类的新实例。Initializes a new instance of the SrgsText class.

重载

SrgsText()

初始化 SrgsText 类的新实例。Initializes a new instance of the SrgsText class.

SrgsText(String)

在指定实例文本的情况下,初始化 SrgsText 类的新实例。Initializes a new instance of the SrgsText class, specifying the text of the instance.

SrgsText()

初始化 SrgsText 类的新实例。Initializes a new instance of the SrgsText class.

public:
 SrgsText();
public SrgsText ();
Public Sub New ()

注解

这是类的无参数构造函数 SrgsTextThis is the parameterless constructor for the SrgsText class.

适用于

SrgsText(String)

在指定实例文本的情况下,初始化 SrgsText 类的新实例。Initializes a new instance of the SrgsText class, specifying the text of the instance.

public:
 SrgsText(System::String ^ text);
public SrgsText (string text);
new System.Speech.Recognition.SrgsGrammar.SrgsText : string -> System.Speech.Recognition.SrgsGrammar.SrgsText
Public Sub New (text As String)

参数

text
String

用于设置 Text 属性上 SrgsText 实例的值。The value used to set the Text property on the SrgsText instance.

例外

textnulltext is null.

适用于