Addition Operator (Choices, GrammarBuilder)

Microsoft Speech Platform SDK 11

Collapse image Expand Image Copy image CopyHover image

Creates a new GrammarBuilder that contains a Choices object followed by a GrammarBuilder object.

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

Syntax

Visual Basic (Declaration)
Public Shared Operator + ( _
	choices As Choices, _
	builder As GrammarBuilder _
) As GrammarBuilder
Visual Basic (Usage)
Dim choices As Choices
Dim builder As GrammarBuilder
Dim returnValue As GrammarBuilder

returnValue = (choices + builder)
C#
public static GrammarBuilder operator +(
	Choices choices,
	GrammarBuilder builder
)

Parameters

choices
Type: Microsoft.Speech.Recognition..::..Choices

The first grammar element, which represents a set of alternatives.

builder
Type: Microsoft.Speech.Recognition..::..GrammarBuilder

The second grammar element.

Return Value

Type: Microsoft.Speech.Recognition..::..GrammarBuilder

Returns a GrammarBuilder for the sequence of the choices parameter followed by the builder parameter.

Remarks

GrammarBuilder supports conversions from the following classes.

This method accepts the objects listed above for the builder parameter. For more information, see the ImplicitWideningImplicitImplicitImplicit operators.

Important noteImportant

When you combine Choices or GrammarBuilder objects that contain SemanticResultValue or SemanticResultKey instances, make sure you avoid creating duplicate semantic elements with the same key name or multiple semantic elements that could repeatedly modify the Value property of a SemanticValue object. The speech recognizer can throw an exception if it encounters these circumstances. For more information about building a speech recognition grammar that contains semantic information, see Add Semantics to a GrammarBuilder Grammar (Microsoft.Speech).

See Also