News for hackers. Stuff that matters.
Re:Asynchronous Programming in C# by torginus on Friday September 24, 2021 @11:10AM (#28643508)
Well, you can put it into an extension method like this:

T SyncResult<T>(this Task<T> task){ return task.ConfigureAwait(false).Result; }

Same for ValueTask. It may already be implemented in the base .NET library as well.

There are no comments on this comment yet.