Back
Close

Your Ultimate async / await Tutorial in C#

AramT
32.8K views
Previous: Introduction Next: Why write asynchronous?

The main benefits of asynchronous programming using async / await include the following:

  • Increase the performance and responsiveness of your application, particularly when you have long-running operations that do not require to block the execution. In this case, you can perform other work while waiting for the result from the long running task.

  • Organize your code in a neat and readable way significantly better than boilerplate code of the traditional thread creation and handling. with async / await , you write less code and your code will be more maintainable than using the previous asynchronous programming methods such as using plain tasks.

  • async / await is the newer replacement to BackgroundWorker, which has been used on windows forms desktop applications.

  • You make use of the latest upgrades of the language features, as async / await was introduced in C# 5, and there have been some improvements added to the feature like foreach async and generalized async type like ValueTask.

Create your playground on Tech.io
This playground was created on Tech.io, our hands-on, knowledge-sharing platform for developers.
Go to tech.io
codingame x discord
Join the CodinGame community on Discord to chat about puzzle contributions, challenges, streams, blog articles - all that good stuff!
JOIN US ON DISCORD
Online Participants