title: Is there a generic Task.WaitAll?
body: <p>I start a few parallel tasks, like this:</p>
  
  <pre><code>var tasks =
      Enumerable.Range(1, 500)
      .Select(i =&gt; Task.Factory.StartNew&lt;int&gt;(ProduceSomeMagicIntValue))
      .ToArray();
  </code></pre>
  
  <p>and then join them with</p>
  
  <pre><code>Task.WaitAll(tasks);
  </code></pre>
  
  <p>On this last line I get a blue squiggly marker under <code>tasks</code>, with a warning message:</p>
  
  <p><strong><pre>Co-variant array conversion from Task[] to Task[] 
  can cause run-time exception on write operation.</pre></strong></p>
  
  <p>I understand why I get this message, but is there a way around that? (for example, like a generic version of <code>Task.WaitAll()</code>?)</p>