title: Remove items from ListBox if item exists in another ListBox
body: <p>I am trying to remove numerical items from a ListBox if those values exist in another ListBox. My code does not seem to work and I could not locate any help online. ListBox1 is populated by Array and ListBox2 is populated from a DataSet table (fyi).</p>
  
  <p>Also for reference: I'm not adding and items to a listbox or selecting...simply just want to compare both and remove ListBox2 items from ListBox1 if they exist all automatically with a press of a button. Thank you,</p>
  
  <pre><code>private void button1_Click(object sender, EventArgs e)
  {
      foreach (int item in listBox1.Items)
      {
          if (listBox2.Items.Contains(item))
          {
              listBox1.Items.Remove(item);
          }
      }
  }
  </code></pre>