Delen via


Note

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

SrgsItem Constructor (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.

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

Syntax

'Declaration
Public Sub New ( _
    min As Integer, _
    max As Integer, _
    ParamArray elements As SrgsElement() _
)
'Usage
Dim min As Integer
Dim max As Integer
Dim elements As SrgsElement()

Dim instance As New SrgsItem(min, max, _
    elements)
public SrgsItem(
    int min,
    int max,
    params SrgsElement[] elements
)

Parameters

  • min
    Type: System.Int32
    The minimum number of times that any of the items in the SrgsItem object must be repeated.
  • max
    Type: System.Int32
    The maximum number of times that the contents of the SrgsItem object must be repeated.
  • elements
    Type: []
    The array of objects to add to the SrgsItem instance.

Exceptions

Exception Condition
ArgumentNullException

elements is a null reference (Nothing in Visual Basic).

ArgumentException

Any member of the elements array is a null reference (Nothing in Visual Basic).

See Also

Reference

SrgsItem Class

SrgsItem Members

SrgsItem Overload

Microsoft.Speech.Recognition.SrgsGrammar Namespace

Other Resources

Create Grammars Using SrgsGrammar (Microsoft.Speech)