GrammarBuilder.Add Method (String, GrammarBuilder)

Returns a new instance of GrammarBuilder constructed from by appending the grammar logic of a GrammarBuilder instance to a phrase.

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


Public Shared Function Add ( _
    phrase As String, _
    builder As GrammarBuilder _
) As GrammarBuilder
public static GrammarBuilder Add (
    string phrase,
    GrammarBuilder builder
static GrammarBuilder^ Add (
    String^ phrase, 
    GrammarBuilder^ builder
public static GrammarBuilder Add (
    String phrase, 
    GrammarBuilder builder
public static function Add (
    phrase : String, 
    builder : GrammarBuilder
) : GrammarBuilder


  • builder
    A valid instance of GrammarBuilder containing grammar logic to be appended to the grammar logic of choices.

Return Value

Returns an instance of GrammarBuilder if successful, null is returned or an exception generated if the operation fails.


Because GrammarBuilder support implicit conversions from SemanticResultValue and SemanticResultKey, these may be cast to use as builder.

Thread Safety

All public static (Shared in Visual Basic) members of this type are thread-safe. Instance members are not guaranteed to be thread-safe.


Development Platforms

Windows XP Professional with Service Pack 2 (SP2), Windows Server 2003, Windows Vista Ultimate Edition, Windows Vista Business Edition, Windows Vista Enterprise Edition

Target Platforms

See Also


GrammarBuilder Class
GrammarBuilder Members
Microsoft.Speech.Recognition Namespace