![Collapse image Collapse image](collapse_all.gif)
![Expand Image Expand Image](expand_all.gif)
![](collapse_all.gif)
![](expand_all.gif)
![](dropdown.gif)
![](dropdownHover.gif)
![Copy image Copy image](copycode.gif)
![CopyHover image CopyHover image](copycodeHighlight.gif)
Initializes a new instance of the SrgsItem class, specifies the text associated with the item, and sets minimum and maximum repetition counts.
Namespace:
Microsoft.Speech.Recognition.SrgsGrammar
Assembly:
Microsoft.Speech (in Microsoft.Speech.dll)
Syntax
Visual Basic (Declaration) |
---|
Public Sub New ( _ min As Integer, _ max As Integer, _ text As String _ ) |
Visual Basic (Usage) |
---|
Dim min As Integer Dim max As Integer Dim text As String Dim instance As New SrgsItem(min, max, _ text) |
C# |
---|
public SrgsItem( int min, int max, string text ) |
Parameters
- min
- Type: System..::..Int32
The minimum number of times that the item can be repeated.
- max
- Type: System..::..Int32
The maximum number of times that the item can be repeated.
- text
- Type: System..::..String
The text associated with the item.
Exceptions
Exception | Condition |
---|---|
ArgumentOutOfRangeException | min is negative or larger than 255. max is negative or larger than 255. |
ArgumentException | min is larger than max. |