Top "Async-await" questions

This covers the asynchronous programming model supported by various programming languages, using the async and await keywords.

Using async/await for multiple tasks

I'm using an API client that is completely asynchrounous, that is, each operation either returns Task or Task<T&…

c# .net task-parallel-library async-await c#-5.0
Running multiple async tasks and waiting for them all to complete

I need to run multiple async tasks in a console application, and wait for them all to complete before further …

c# .net asynchronous task-parallel-library async-await
Calling async method synchronously

I have an async method: public async Task<string> GenerateCodeAsync() { string code = await GenerateCodeService.GenerateCodeAsync(); return code; } I …

c# asp.net asynchronous task-parallel-library async-await
async await return Task

Can somebody explain what does this means into a synchronous method? If I try to change the method to async …

c# asynchronous async-await
Catch an exception thrown by an async void method

Using the async CTP from Microsoft for .NET, is it possible to catch an exception thrown by an async method …

c# asynchronous exception-handling async-await task-parallel-library
How to safely call an async method in C# without await

I have an async method which returns no data: public async Task MyAsyncMethod() { // do some stuff async, don't return any …

c# exception async-await task task-parallel-library
Best practice to call ConfigureAwait for all server-side code

When you have server-side code (i.e. some ApiController) and your functions are asynchronous - so they return Task<…

c# asp.net-web-api task-parallel-library async-await
HttpClient.GetAsync(...) never returns when using await/async

Edit: This question looks like it might be the same problem, but has no responses... Edit: In test case 5 the …

c# .net asynchronous async-await dotnet-httpclient
Effectively use async/await with ASP.NET Web API

I am trying to make use of the async/await feature of ASP.NET in my Web API project. I …

c# asp.net-mvc asp.net-web-api async-await
Can constructors be async?

I have a project where I'm trying to populate some data in a constructor: public class ViewModel { public ObservableCollection<…

c# constructor async-await