title: foreach Collection was modified; enumeration operation may not execute
body: <p>I am trying to run a test generation and passing some of the test outputs to a <code>foreach</code> loop, but every other time I try to run the method it stops and the <code>in</code> in the <code>foreach</code> loop it gives an exception </p>
  
  <blockquote>
    <p>System.InvalidOperationException occurred in mscorlib.dll </p>
  </blockquote>
  
  <p>and then the Exception is caught in the <code>try catch</code> and gives the error </p>
  
  <blockquote>
    <p>Collection was modified; enumeration operation may not execute </p>
  </blockquote>
  
  <p>I'm not entirely sure why this error is being produced!</p>