title: Parallel.ForEach() vs. foreach(IEnumerable<T>.AsParallel())
body: <p>Erg, I'm trying to find these two methods in the BCL using Reflector, but can't locate them. What's the difference between these two snippets?</p>
  
  <p>A:</p>
  
  <pre><code>IEnumerable&lt;string&gt; items = ...
  
  Parallel.ForEach(items, item =&gt; {
     ...
  });
  </code></pre>
  
  <p>B:</p>
  
  <pre><code>IEnumerable&lt;string&gt; items = ...
  
  foreach (var item in items.AsParallel())
  {
     ...
  }
  </code></pre>
  
  <p>Are there different consequences of using one over the other? (Assume that whatever I'm doing in the bracketed bodies of both examples is thread safe.)</p>