Partilhar via


SrgsItem Constructors

Definition

Initializes a new instance of the SrgsItem class.

Overloads

SrgsItem()

Initializes a new instance of the SrgsItem class.

SrgsItem(Int32)

Initializes a new instance of the SrgsItem class and specifies the number of times that its contents must be spoken.

SrgsItem(SrgsElement[])

Initializes a new instance of the SrgsItem class and specifies an array of SrgsElement objects to add to this instance.

SrgsItem(String)

Initializes a new instance of the SrgsItem class and specifies its textual contents.

SrgsItem(Int32, Int32)

Initializes a new instance of the SrgsItem class and specifies minimum and maximum repetition counts.

SrgsItem(Int32, Int32, SrgsElement[])

Initializes a new instance of the SrgsItem class, specifies an array of SrgsElement objects to add to this instance, and sets minimum and maximum repetition counts.

SrgsItem(Int32, Int32, String)

Initializes a new instance of the SrgsItem class, specifies the text associated with the item, and specifies minimum and maximum repetition counts.

Remarks

This overloaded constructor for SrgsItem initializes the object with a default repeatCount property of 0.

SrgsItem()

Source:
SrgsItem.cs
Source:
SrgsItem.cs
Source:
SrgsItem.cs

Initializes a new instance of the SrgsItem class.

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

Applies to

SrgsItem(Int32)

Source:
SrgsItem.cs
Source:
SrgsItem.cs
Source:
SrgsItem.cs

Initializes a new instance of the SrgsItem class and specifies the number of times that its contents must be spoken.

public:
 SrgsItem(int repeatCount);
public SrgsItem (int repeatCount);
new System.Speech.Recognition.SrgsGrammar.SrgsItem : int -> System.Speech.Recognition.SrgsGrammar.SrgsItem
Public Sub New (repeatCount As Integer)

Parameters

repeatCount
Int32

The number of times that the item must be spoken.

Exceptions

repeatCount is negative or is larger than 255.

Remarks

This constructor sets MaxRepeat and MinRepeat properties of the new SrgsItem to the value in repeatCount.

Applies to

SrgsItem(SrgsElement[])

Source:
SrgsItem.cs
Source:
SrgsItem.cs
Source:
SrgsItem.cs

Initializes a new instance of the SrgsItem class and specifies an array of SrgsElement objects to add to this instance.

public:
 SrgsItem(... cli::array <System::Speech::Recognition::SrgsGrammar::SrgsElement ^> ^ elements);
public SrgsItem (params System.Speech.Recognition.SrgsGrammar.SrgsElement[] elements);
new System.Speech.Recognition.SrgsGrammar.SrgsItem : System.Speech.Recognition.SrgsGrammar.SrgsElement[] -> System.Speech.Recognition.SrgsGrammar.SrgsItem
Public Sub New (ParamArray elements As SrgsElement())

Parameters

elements
SrgsElement[]

The array of objects to add to the SrgsItem instance.

Exceptions

elements is null.

Any member of the elements array is null.

Applies to

SrgsItem(String)

Source:
SrgsItem.cs
Source:
SrgsItem.cs
Source:
SrgsItem.cs

Initializes a new instance of the SrgsItem class and specifies its textual contents.

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

Parameters

text
String

The text associated with the item.

Exceptions

text is null.

text is an empty string.

Applies to

SrgsItem(Int32, Int32)

Source:
SrgsItem.cs
Source:
SrgsItem.cs
Source:
SrgsItem.cs

Initializes a new instance of the SrgsItem class and specifies minimum and maximum repetition counts.

public:
 SrgsItem(int min, int max);
public SrgsItem (int min, int max);
new System.Speech.Recognition.SrgsGrammar.SrgsItem : int * int -> System.Speech.Recognition.SrgsGrammar.SrgsItem
Public Sub New (min As Integer, max As Integer)

Parameters

min
Int32

The minimum number of times that the text in the item must be repeated.

max
Int32

The maximum number of times that the text in the item can be repeated.

Exceptions

min is negative or larger than 255.

max is negative or larger than 255.

min is larger than max.

Applies to

SrgsItem(Int32, Int32, SrgsElement[])

Source:
SrgsItem.cs
Source:
SrgsItem.cs
Source:
SrgsItem.cs

Initializes a new instance of the SrgsItem class, specifies an array of SrgsElement objects to add to this instance, and sets minimum and maximum repetition counts.

public:
 SrgsItem(int min, int max, ... cli::array <System::Speech::Recognition::SrgsGrammar::SrgsElement ^> ^ elements);
public SrgsItem (int min, int max, params System.Speech.Recognition.SrgsGrammar.SrgsElement[] elements);
new System.Speech.Recognition.SrgsGrammar.SrgsItem : int * int * System.Speech.Recognition.SrgsGrammar.SrgsElement[] -> System.Speech.Recognition.SrgsGrammar.SrgsItem
Public Sub New (min As Integer, max As Integer, ParamArray elements As SrgsElement())

Parameters

min
Int32

The minimum number of times that the contents of the SrgsItem object must be repeated.

max
Int32

The maximum number of times that the contents of the SrgsItem object can be repeated.

elements
SrgsElement[]

The array of objects to add to the SrgsItem instance.

Exceptions

elements is null.

Any member of the elements array is null.

Applies to

SrgsItem(Int32, Int32, String)

Source:
SrgsItem.cs
Source:
SrgsItem.cs
Source:
SrgsItem.cs

Initializes a new instance of the SrgsItem class, specifies the text associated with the item, and specifies minimum and maximum repetition counts.

public:
 SrgsItem(int min, int max, System::String ^ text);
public SrgsItem (int min, int max, string text);
new System.Speech.Recognition.SrgsGrammar.SrgsItem : int * int * string -> System.Speech.Recognition.SrgsGrammar.SrgsItem
Public Sub New (min As Integer, max As Integer, text As String)

Parameters

min
Int32

The minimum number of times that the item must be repeated.

max
Int32

The maximum number of times that the item can be repeated.

text
String

The text associated with the item.

Exceptions

min is negative or larger than 255.

max is negative or larger than 255.

min is larger than max.

Applies to