The await operator suspends evaluation of the enclosing async method until the asynchronous operation represented by its operand completes
But according to this post:
//You can access the Result property of the task,
//which will cause your thread to block until the result is available:
string code = GenerateCodeAsync().Result;
Does that mean that we don't need await
anymore? Because if we use await
, we have to change the function to async
which complicates the logic. But accessing the result property of a task doesn't require this