title: Parallel.ForEach vs Task.Factory.StartNew
body: <p>What is the difference between the below code snippets? Won't both be using threadpool threads?</p>
  
  <p>For instance if I want to call a function for each item in a collection,</p>
  
  <pre><code>Parallel.ForEach&lt;Item&gt;(items, item =&gt; DoSomething(item));
  
  vs
  
  foreach(var item in items)
  {
    Task.Factory.StartNew(() =&gt; DoSomething(item));
  }
  </code></pre>