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, ...

Get C# 6 and .NET Core 1.0: Modern Cross-Platform Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.