title: Compare two list of objects C#
body: <p>I want to compare two list of objects. These lists contains the same type of objects. I create a new List in my programme and i want to compare it at the old list which is in the database. I get it with a stored procedure, then i put it into an object.</p>
  
  <pre><code>The old list :                     the new list :
  
  *Category 1*                         Category 5
  *Category 2*                         Category 6
  *Category 3*                         *Category 4*  
  Category 4
  </code></pre>
  
  <p>Here the aim is to <strong>delete the first three Category in the old list</strong>, beacause they don't exist in the new list. And to <strong>delete the Category 4 in the  new list</strong> because category 4 already exists in the old list.</p>
  
  <p>It is possible to use à method like <code>Equals()</code> or use two <code>foreach</code> loop to browse the lists ?</p>
  
  <p>Thanks for you answers and advises</p>