I am new to async programming and I am wondering if you can fake c# async methods to make it work like its sync? Or if you can make it wait for it to complete before executing another method?
In my case :
await Speak("Do you want me to call 123 ?"); if (isComplete) { PhoneCallTask phone = new PhoneCallTask(); phone.PhoneNumber = "123"; phone.Show(); } await Speak("blabla"); isComplete is global boolean..
here is Speak method:
private async Task Speak(string text) { SpeechSynthesizer synth = new SpeechSynthesizer(); await synth.SpeakTextAsync(text); isComplete = true; } It says first text, than shows dialog.. after dialog is cloes it crashes..