Your Ultimate async / await Tutorial in C#


There are some libraries in .Net Framework 4.5, that has a built-in support for asynchronous programming using asyncawait keywords.

These libraries, such as the HttpClient, StreamWriter, StreamReader and many more, provide you async methods that you can use in your program directly with await.

They have been added with the async/await capabilities because these provide functionalities that require long-running operations such as reading large file or download huge resources.

So the asyncawait will significantly improve the performance of your application while not blocking the UI or the execution.

I/O Bound async / await

Let's take an example for using the HttpClient's GetStringAsync method, that will hit a provided URL and return the html response content from it and display its length on Console screen:

Click run to see the console output
·using System;
using System.Net.Http;
using System.Threading.Tasks;
namespace AsyncApp
class Program
private const string URL = "";
Create your playground on
This playground was created on, our hands-on, knowledge-sharing platform for developers.
Go to
codingame x discord
Join the CodinGame community on Discord to chat about puzzle contributions, challenges, streams, blog articles - all that good stuff!
Online Participants