standards-c-sharp

Never use Task.Wait()

By design, Task.Wait blocks the current thread until the task completes. This defeats the purpose of writing async code. It also has the potential to cause deadlocks.

Don’t

task.Wait();
var result = task.Result;

Do

var result = await task;

Further reading