title: C#: Joining two Lists excluding duplicates
body: <p>What is a simple effective way to take <em>List2</em> and add it to the end of <em>List1</em> - but in a way that only those items that are <strong>not</strong> already in <em>List1</em> before the concatenation - will be added to it?</p>
  
  <p><strong>EDIT:</strong>
  I've been trying methods suggested in answers here, but I still get dupes added to List1! <br />
  This is a code example:</p>
  
  <pre><code>// Assume the existence of a class definition for 'TheObject' which contains some 
  // strings and some numbers.
  
  string[] keywords = {"another", "another", "another"};
  List&lt;TheObject&gt; tempList = new List&lt;TheObject&gt;();
  List&lt;TheObject&gt; globalList = new List&lt;TheObject&gt;();
  
  foreach (string keyword in keywords)
  {
      tempList = // code that returns a list of relevant TheObject(s) according to
                 // this iteration's keyword.
      globalList = globalList.Union&lt;TheObject&gt;(tempList).ToList();
  }
  </code></pre>
  
  <p>When debugging - after the second iteration - globalList contain two copies of the exact same object of TheObject. Same thing happens also when I try implementing Edward Brey's solution...</p>
  
  <p><strong>EDIT2:</strong> <br />
  I've modified the code that returns a new tempList, to also check if the returned items are already in the globalList (by doing !globalList.contains()) - it works now.  <br />
  Though, this is a work-around...</p>