I\'m studying C# by following the guides in MSDN.
Now, I just tried the Example 1 (here is the link to MSDN), and I\'ve encountered an i
this is the answer async at console app in C#?
anything whereever in the console app never use await
but instead use theAsyncMethod().GetAwaiter().GetResult();
,
example
var result = await HttpClientInstance.SendAsync(message);
becomes
var result = HttpClientInstance.SendAsync(message).GetAwaiter().GetResult();