First, we will write a simple console application that needs to execute three methods, and execute them synchronously (one after the other).
Running tasks asynchronously
Running multiple actions synchronously
In Visual Studio 2017, press Ctrl + Shift + N or go to File | Add | New Project....
In the New Project dialog, in the Installed list, expand Visual C#, and select .NET Core. In the center list, select Console App (.NET Core), type the name as WorkingWithTasks, change the location to C:\Code, type the solution name as Chapter13, and then click on OK.
In Visual Studio Code, create a directory named Chapter13 with a subfolder named WorkingWithTasks, and open the WorkingWithTasks folder. In Integrated Terminal, execute the...