I am new to asynchronous programming with the async
modifier. I am trying to figure out how to make sure that my Main
method of a console applicati
Newest version of C# - C# 7.1 allows to create async console app. To enable C# 7.1 in project, you have to upgrade your VS to at least 15.3, and change C# version to C# 7.1
or C# latest minor version
. To do this, go to Project properties -> Build -> Advanced -> Language version.
After this, following code will work:
internal class Program
{
public static async Task Main(string[] args)
{
(...)
}