Grammar Constructor (GrammarInfo)

Microsoft Speech Platform SDK 11

Collapse imageExpand ImageCopy imageCopyHover image

Creates a new instance of the Grammar class from a GrammarInfo instance.

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

Syntax

Visual Basic (Declaration)
Public Sub New ( _
	grammarInfo As GrammarInfo _
)
Visual Basic (Usage)
Dim grammarInfo As GrammarInfo

Dim instance As New Grammar(grammarInfo)
C#
public Grammar(
	GrammarInfo grammarInfo
)

Parameters

grammarInfo
Type: Microsoft.Speech.Recognition..::..GrammarInfo

The GrammarInfo instance with which to initialize the Grammar.

Exceptions

ExceptionCondition
ArgumentNullException

Thrown when grammarInfo is nullNothingnullptrunita null reference (Nothing in Visual Basic).

ArgumentNullException

Thrown when the grammar referred to by grammarInfo does not have a root rule.

See Also