Hey Kuba, nice article!
On
Remember that supplied tasks has to have the same result type.
We should be able to do a Task.WhenAll on tasks with different return types.
await Task.WhenAll(taskReturnsInt, taskReturnsString);
var intResult = taskReturnsInt.Result;
var stringResult = await taskReturnsString;
Hey Kuba, nice article!
On
We should be able to do a Task.WhenAll on tasks with different return types.
await Task.WhenAll(taskReturnsInt, taskReturnsString); // next lines would execute only after Task.WhenAll completed // block and get result var intResult = taskReturnsInt.Result; // or asynchronously get result var stringResult = await taskReturnsString;