title: C# List insert in foreach
body: <p>I have the following loop:</p>
  
  <pre><code>List&lt;Reminders&gt; reminds = new List&lt;Reminders&gt;();
  //...
  foreach (Reminders remind in reminds)
  {
      //....
      reminds.Insert(id, new Reminders() { Title = remind.Title, Content = remind.Content, Checked = true });
  }
  </code></pre>
  
  <p>However, an error occurs in the <code>foreach</code> loop.</p>
  
  <pre><code>foreach (Reminders remind in reminds)
  </code></pre>
  
  <p>If I remove the <code>reminds.Insert</code> statement, the error no longer occurs. I'm trying to update some entires inside of the <code>foreach</code> loop. What's causing the error?</p>