Before you begin

This is a Xamarin.Forms class. To complete the coding exercises, you will need a Xamarin.Forms development environment with either a simulator or a device to run the exercise on. Please see the setup page if you need help installing the Xamarin development environment.

Overview

In this class you will learn how to apply asynchronous programming models to your C# applications in order to keep you app's UI responsive during long running operations.

Objectives

  1. Introducing the async and await keywords
  2. Applying async and await
  3. Diving into the internals of async and await

Lecture

CSC - Using Async and Await.

Exercises

Exercise materials are available from GitHub. The code can be cloned through a desktop Git client or downloaded directly as a ZIP file.

  1. Use existing async APIs in an application
    Exercise
    In this exercise, we will modify an application that downloads Movie data synchronously to use the event-based Async pattern.
  2. Convert app to use async and await
    Exercise
    In this exercise, we will update an application using the event-based Async pattern to use the task-based Async pattern.

Additional resources

Here are the Frequently Asked Questions about Async and Await.

Asynchronous Programming with Async and Await Best Practices in Async/Await programming Six Essential Tips for Async