---
title: "Difference between await and Task.Wait"  
description: "Difference between await and Task.Wait"  
author: "Anonymous User"  
published: 2013-12-27  
updated: 2013-12-27  
canonical: https://www.mindstick.com/forum/1846/difference-between-await-and-task-wait  
category: "c#"  
tags: ["c#"]  
reading_time: 1 minute  

---

# Difference between await and Task.Wait

## First way:

```
var tds=SearchProcess();await tds;public async 
Task<XmlElement> SearchProcess(){}
```

**[Second](https://answers.mindstick.com/qa/41761/how-did-the-second-industrial-revolution-influence-women-s-roles-in-society) way:**

```
var tds= Task.Factory.StartNew(()=>SearchProcess());Task.WaitAll(tds);public XmlElement SearchProcess(){}
```

In above both [approach](https://www.mindstick.com/interview/985/what-are-the-approaches-that-you-will-follow-for-making-a-program-very-efficient) any performance [difference](https://www.mindstick.com/articles/157114/good-news-or-bad-news-and-the-difference-is) is there?

## Replies

### Reply by Anonymous User

Hi Tanuj,

Task.WaitAll is blocking, while using await will make the containing method async. To wait for multiple tasks asynchronously you can use Task.WhenAll:

```
public async Task DoSomething(){    IEnumerable<Task> tds = SearchProcess();    await Task.WhenAll(tds);    //continue processing   }
```


---

Original Source: https://www.mindstick.com/forum/1846/difference-between-await-and-task-wait

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
