title: How does Array.ForEach() compare to standard for loop in C#?
body: <p>I pine for the days when, as a C programmer, I could type:</p>
  
  <pre><code>memset( byte_array, '0xFF' );
  </code></pre>
  
  <p>and get a byte array filled with 'FF' characters.  So, I have been looking for a replacement for this: </p>
  
  <pre><code>for (int i=0; i &lt; byteArray.Length; i++)
  {
      byteArray[i] = 0xFF;
  }
  </code></pre>
  
  <p>Lately, I have been using some of the new C# features and have been using this approach instead:</p>
  
  <pre><code>Array.ForEach&lt;byte&gt;(byteArray, b =&gt; b = 0xFF);
  </code></pre>
  
  <p>Granted, the second approach seems cleaner and is easier on the eye, but how does the performance compare to using the first approach?  Am I introducing needless overhead by using Linq and generics?</p>
  
  <p>Thanks,
  Dave</p>