---
title: "Comment by kndb on \"Await tasks with multiple result types\" | Hashnode"
description: "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"
url: "https://hashnode.com/posts/await-tasks-with-multiple-result-types/60fd6a4531552277811af166/comment/61017d17d3dd5634ae90859d"
---

[Discussion](https://hashnode.com/posts/await-tasks-with-multiple-result-types/60fd6a4531552277811af166)

Comment [Await tasks with multiple result types](https://hashnode.com/posts/await-tasks-with-multiple-result-types/60fd6a4531552277811af166)

[kndb](https://hashnode.com/@kndb)

[Jul 28, 2021](https://hashnode.com/posts/await-tasks-with-multiple-result-types/60fd6a4531552277811af166/comment/61017d17d3dd5634ae90859d)

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);

// 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;
```

[Kuba Ciechowski](https://hashnode.com/@kciechowski)

[Jul 28, 2021](https://hashnode.com/posts/await-tasks-with-multiple-result-types/60fd6a4531552277811af166/comment/61017d17d3dd5634ae90859d#reply-6101a0402db92534dc933ecb)

Hey kndb! You are right. Thank you for pointing this out :)
