当我的 Metro 应用程序的一部分发生异常时,我会触发以下方法
void Model_ExceptionOccured(Exception ex)
{
var dlg = new Windows.UI.Popups.MessageDialog("An exception occured during verification: " + ex.Message, "Exception");
dlg.ShowAsync();
}
'dlg.ShowAsync()' 调用是异步的,但我不想等待结果。编译器会为它生成一个警告:
Because this call is not awaited, execution of the current method continues before the call is completed. Consider applying the 'await' operator to the result of the call.
我应该关心吗?除了摆脱警告之外,还有什么理由我应该添加 await 关键字?