title: InvalidOperationException: Collection Was Modified
body: <p>I know that I can't modify a collection while iterating over it.</p>
  
  <p>Normally I make a copy of the collection I want to iterate over, then iterate over the copy to avoid errors.</p>
  
  <p>My program; however, makes lots of fast modifications to the collection I'm trying to make a copy of.</p>
  
  <p>Could the error be occurring because I am making a copy while the parent collection is being modified?</p>
  
  <p>I know ConcurrentDictionary provides some sort of locking mechanism for cross threading. Is there something similar I can use to prevent this error?</p>
  
  <pre><code>    // Original collection:
      Dictionary&lt;string, Enemy&gt; Dict_Enemies = new Dictionary&lt;string, Enemy&gt;();
  
      // Copy of original collection: (this line throws the exception)
      Dictionary&lt;string, Enemy&gt; Dict_Enemies_Copy = new Dictionary&lt;string, Enemy&gt;(Dict_Enemies);
  </code></pre>