title: C# loops: iterating through an array
body: <p>If I have a loop such as below:</p>
  
  <pre><code>foreach (string pass in new string[] { "pass1", "pass2", "pass3" })
  {
   x = pass; //etc
  }
  </code></pre>
  
  <p>does the anonymous string array get created once initially, or recreated once for each pass?</p>
  
  <p>I believe the former, but collegues are convinced this is a bug waiting to happen because they say every iteration of the foreach loop results in a new string array being created.</p>
  
  <p>The VS Disassembly code suggests I am right, but I want to be sure.</p>
  
  <p>The reason we are looking at this is to try to understand a mysterious bug that reports that a collection has been changed whilst iterating over it.</p>