SrgsItem Constructor (Int32, Int32, array<SrgsElement>[]()[][]) |
SrgsItem Class See Also Send Feedback |
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
Visual Basic (Declaration) |
---|
Public Sub New ( _ min As Integer, _ max As Integer, _ ParamArray elements As SrgsElement() _ ) |
Visual Basic (Usage) |
---|
Dim min As Integer Dim max As Integer Dim elements As SrgsElement() Dim instance As New SrgsItem(min, max, _ elements) |
C# |
---|
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: array<Microsoft.Speech.Recognition.SrgsGrammar..::..SrgsElement>[]()[][]
The array of objects to add to the SrgsItem instance.
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | elements is nullNothingnullptrunita null reference (Nothing in Visual Basic). |
ArgumentException | Any member of the elements array is nullNothingnullptrunita null reference (Nothing in Visual Basic). |