title: C# Task.Wait() Aggregate Exception
body: <p>My code :</p>
  
  <pre><code>void Method(){
  Task T = Task.Factory.StartNew(() =&gt;
  {
      for (int i=0;i&lt;count;i++)
      {
          textBox1.Text += "x";
          Thread.Sleep(500);
      }
  });
  T.Wait();
  }
  </code></pre>
  
  <p>I want to this task wait until everything ends and then exists the method and the main thread resume its work...
  But i get <code>AggregateException was unhandled</code> Error on <code>T.Wait();</code></p>
  
  <p>What's wrong with this ?</p>