title: How to modify a foreach iteration variable from within foreach loop?
body: <p>When I try to do this...</p>
  
  <pre><code>Item[,] array = new Item[w, h];  // Two dimensional array of class Item, 
                                   //   w, h are unknown at compile time.
  foreach(var item in array)
  {
      item = new Item();
  }
  </code></pre>
  
  <p>...I get <code>Cannot assign to 'item' because it is a 'foreach iteration variable'</code>.</p>
  
  <p>Still, I'd like to do that.</p>
  
  <p>The idea is to assign default <code>Item</code> class values to existing item.</p>