title: Collection was modified, but it wasn't
body: <p>I have this two methods to cast data of session:</p>
  <pre class="lang-cs prettyprint-override"><code>static void Send(string message, Socket client)
  {
      try
      {
          byte[] data = Encoding.ASCII.GetBytes(message);
          client.Send(data);
      }
      catch (Exception e)
      {
          Console.WriteLine(e.Message);
      }
  }
  
  static void Cast(SessionInstance session)
  {
      SessionInstance copiedSession = session;
      string message = Serialize(copiedSession);
  
      foreach (var player in copiedSession.players)
      {
          Send(message, player.ClientSocket);
      }
  }
  
  public static string Serialize(SessionInstance session)
  {
      return JsonConvert.SerializeObject(session);
  }
  </code></pre>
  <p>The <code>Cast</code> method is called from another thread. <br/>
  I copy the collection so that it is not changed by one of the threads during the loop, but the error still occurs on serialization or on foreach. <br/>
  I have tried a lot, I do not know what to do.</p>