title: Strange "Collection was modified after the enumerator was instantiated" exception
body: <p>Perhaps someone can point me in the correct direction, because I'm completely stumped on this.</p>
  
  <p>I have a function that simply prints out a LinkedList of classes:</p>
  
  <pre><code>    LinkedList&lt;Component&gt; components = new LinkedList&lt;Component&gt;();
      ...
      private void PrintComponentList()
      {
          Console.WriteLine("---Component List: " + components.Count + " entries---");
          foreach (Component c in components)
          {
              Console.WriteLine(c);
          }
          Console.WriteLine("------");
      }
  </code></pre>
  
  <p>The <code>Component</code> object actually has a custom <code>ToString()</code> call as such:</p>
  
  <pre><code>    int Id;
      ...
      public override String ToString()
      {
          return GetType() + ": " + Id;
      }
  </code></pre>
  
  <p>This function typically works fine - however I've run into the issue that when it builds to about 30 or so entries in the list, the <code>PrintcomplentList</code> <code>foreach</code> statement comes back with an <code>InvalidOperationException: Collection was modified after the enumerator was instantiated.</code></p>
  
  <p>Now as you can see I'm not modifying the code within the for loop, and I haven't explicitly created any threads, although this is within an XNA environment (if it matters).  It should be noted that the printout is frequent enough that the Console output is slowing down the program as a whole.</p>
  
  <p>I'm completely stumped, has anyone else out there run into this?</p>