Delen via


Note

Please see Azure Cognitive Services for Speech documentation for the latest supported speech solutions.

SrgsItem Constructor (Int32, Int32, String)

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

'Declaration
Public Sub New ( _
    min As Integer, _
    max As Integer, _
    text As String _
)
'Usage
Dim min As Integer
Dim max As Integer
Dim text As String

Dim instance As New SrgsItem(min, max, _
    text)
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.

Exceptions

Exception Condition
ArgumentOutOfRangeException

min is negative or larger than 255.

max is negative or larger than 255.

ArgumentException

min is larger than max.

See Also

Reference

SrgsItem Class

SrgsItem Members

SrgsItem Overload

Microsoft.Speech.Recognition.SrgsGrammar Namespace

Other Resources

Create Grammars Using SrgsGrammar (Microsoft.Speech)