ExtensionMethod.NET Home of 880 C#, Visual Basic, F# and Javascript extension methods

Speak

Spreak the text using a SpeechSynthesizer

Source

Imports System.Runtime.CompilerServices 
Imports System.Speech.Synthesis 

Module Module1 
    <Extension()> _ 
    Sub Speak(ByVal x As String) 
        Using synth As New SpeechSynthesizer() 
            synth.Speak(x) 
        End Using 
    End Sub 

End Module

Example

Dim x = "Hello World" 
x.Speak()

Author: unknown

Submitted on: 24 jan. 2008

Language: VB

Type: System.String

Views: 5448