The async and await keywords
C# 5 introduced two new keywords to simplify working with the Task
type. They are especially useful when multitasking with graphical user interfaces.
Creating a GUI that blocks
In Visual Studio, go to File | Add | New Project…. In the Add New Project dialog, in the Installed Templates list, select Visual C#. In the center list, select WPF Application, type the name as Ch12_GUITasks, and then click on OK.
Tip
We will use a WPF application because these can be created on versions of Windows older than 10. In Chapter 13, Building Universal Windows Platform Apps Using XAML, you will learn about modern Windows apps. However, these can only be created on Windows 10. Obviously, Windows applications of any sort are not cross-platform, so they cannot be executed by the .NET Core!
You will learn more about XAML in the next chapter, but for now, just enter the following code in the XAML view inside the <Grid>
element:
<StackPanel> <Button Name="...