title: Does foreach apply boxing on IEnumerable<struct>?
body: <p>I believe the C# compiler will rewrite <code>foreach</code> into a <code>for</code> when it is used on ordinary arrays (such as <code>int[]</code>). However, for collections that store a <code>struct</code>, will boxing result from iterating its contents?</p>
  
  <p>For example, does the code below rely on boxing (<code>IEnumerable&lt;KeyValuePair&lt;int,byte&gt;&gt;</code>) to iterate the contents of <code>dict</code>?</p>
  
  <pre><code>void DoSomething(Dictionary&lt;int,byte&gt; dict) {
      foreach(KeyValuePair&lt;int,byte&gt; itr in dict)
          m_correlation += itr.Key; }
  </code></pre>