H
HardySpicer
Private Function GetInstalledVoices() As List(Of VoiceInfo)
'get the current cultureinfo
Dim currentCulture As CultureInfo = CultureInfo.CurrentCulture
'use linq to select each voiceinfo object from the
intalledvoices collection
Dim listOfVoiceInfo = From voice In speaker.GetInstalledVoices
(currentCulture) Select voice.VoiceInfo
'return the selected voiceinfo objects
Return listOfVoiceInfo.ToList(Of VoiceInfo)() ...... error
in this line
End Function
I get an error from the compiler
Error 1 Extension method 'Public Function ToList() As
System.Collections.Generic.List(Of TSource)' defined in
'System.Linq.Enumerable' is not generic (or has no free type
parameters) and so cannot have type arguments. C:\Users\hardy\Desktop\
Project\Vista Project\Form1.vb
This Function attempts to get all the voices from SAPI 5.3 to a combo
box.
This is the first part.
Hardy
'get the current cultureinfo
Dim currentCulture As CultureInfo = CultureInfo.CurrentCulture
'use linq to select each voiceinfo object from the
intalledvoices collection
Dim listOfVoiceInfo = From voice In speaker.GetInstalledVoices
(currentCulture) Select voice.VoiceInfo
'return the selected voiceinfo objects
Return listOfVoiceInfo.ToList(Of VoiceInfo)() ...... error
in this line
End Function
I get an error from the compiler
Error 1 Extension method 'Public Function ToList() As
System.Collections.Generic.List(Of TSource)' defined in
'System.Linq.Enumerable' is not generic (or has no free type
parameters) and so cannot have type arguments. C:\Users\hardy\Desktop\
Project\Vista Project\Form1.vb
This Function attempts to get all the voices from SAPI 5.3 to a combo
box.
This is the first part.
Hardy