What is the difference between these two functions in terms of what happens inside them when called?
DoSomething1is a synchronous method. In this way:
- It starts the asynchronous delay and then ignores it.
- Any exceptions to the asynchronous delay are silently ignored.
DoSomething .
DoSomething2 - void. :
- .
SynchronizationContext, DoSomething2. .DoSomething2 SynchronizationContext .
async, ?
async void . , F #. async void #/VB, .
, async void ( , ICommand.Execute MVVM).