RecognizeWithUIAsync 无法使用 await 运算符

RecognizeWithUIAsync cannot use await operator

我为 Windows 下载了 VS 2013 并启动了一个新的 Windows Phone Silverlight 应用程序,放置了一个按钮并试图使示例 here 工作,但是无法' 因为 await 运算符:

MSDN 官方网站上的示例非常简单,有些像三行,我找不到任何相关内容。给出了什么?

错误消息不言自明,您需要将您的方法标记为异步:

private async void Button_Click(object sender, RoutedEventArgs e)

您必须将 async 添加到您的方法中才能在其中使用 await:

private async void Button_Click(object sender, RoutedEventArgs e)