Return types of asynchronous functions

In asynchronous programming, the async methods can have three possible return types. These are as follows:

  • void
  • Task
  • Task<TResult>

We will take a look at each return type in the following recipe.

Get C# 7 and .NET Core Cookbook 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.