async / await can be used when you have asynchronous operations. Many operations are naturally asynchronous (for example, input-output); I recommend async for all of these. Other operations are naturally synchronous (for example, computing); I recommend using synchronous methods for them.
You can use Task.Run with async for background work if you need to execute synchronous code asynchronously. I explain on my blog why this is better than BackgroundWorker and asynchronous delegates .
You can also use async to replace other forms of asynchronous processing, such as the IAsyncResult style.
You should use async in any situation where you have an asynchronous operation.
Stephen cleary
source share