Chapter 5. Using C# 6.0

In this chapter, we will look through native asynchronous programming support in the C# 6.0 programming language. You will learn the following recipes:

  • Using the await operator to get asynchronous task results
  • Using the await operator in a lambda expression
  • Using the await operator with consequent asynchronous tasks
  • Using the await operator for the execution of parallel asynchronous tasks
  • Handling exceptions in asynchronous operations
  • Avoiding the use of the captured synchronization context
  • Working around the async void method
  • Designing a custom awaitable type
  • Using the dynamic type with await


Until now, you learned about the Task Parallel Library, the latest asynchronous programming infrastructure from Microsoft. It ...

Get Multithreading with C# Cookbook - Second Edition 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.