I have the following method that fires when an exception occurs in a part of my Metro application
void Model_ExceptionOccured(Exception ex) { var dlg = new Windows.UI.Popups.MessageDialog("An exception occured during verification: " + ex.Message, "Exception"); dlg.ShowAsync(); }
"dlg.ShowAsync ()" is an asynchronous call, but I do not want to wait for the result. The compiler generates a warning for it:
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.
I do not care? Is there a reason why I should add a wait keyword other than getting rid of the warning?
c # windows-store-apps windows-runtime async-await
Nilzor Jun 21 2018-12-21T00: 00Z
source share