title: C# removing items from listbox
body: <p>I have a listbox being populated from a SQLDATA pull, and it pulls down some columns that i dont want like OBJECT_dfj, OBJECT_daskd.  The key is all of these being with OBJECT_, is there a way to remove these from the listbox?  I cannot change my SQL statement.</p>
  
  <p>i tried this:</p>
  
  <pre><code> foreach (string item in listBox1.Items)
   {
       string removelistitem = "OBJECT";
       if(item.Contains(removelistitem))
       {
           listBox1.Items.Remove(item);
       }
   }
  </code></pre>
  
  <p>but it gave me the error:  </p>
  
  <blockquote>
    <p>List that this enumerator is bound to has been modified. An enumerator can only be used if the list does not change.</p>
  </blockquote>