Kuba's space

Kuba's space

Await tasks with multiple result types

Jul 25, 20212 min read

Regularly I want to await a few tasks and get their result. Surprisingly, there is no obvious way to do that. Task.WhenAll can be helpful, as we see later, but it doesn't solve the problem.My common scenario looks like this: var dbTasks = getDataFrom...