title: LINQ Union Error - type cannot be inferred
body: <p>I'm just trying to perform as simple union on 2 linq queries as below:</p>
  
  <pre><code>var results1 = from a in dt.AsEnumerable()
                 where array1.Contains([COL_1])
                 select new
                 {
                    a = a.Key
                 };
  
  
  var results2 = from b in dt.AsEnumerable()
                 where array2.Contains([COL_2])
                 select new
                 {
                    b = b.Key
                 };
  
  var concatResults = results1.Union(results2);
  </code></pre>
  
  <p>But I am getting the following error:</p>
  
  <blockquote>
    <p>The type arguments for method 'System.Linq.Enumerable.Union(System.Collections.Generic.IEnumerable,
    System.Collections.Generic.IEnumerable)' cannot be inferred
    from the usage. Try specifying the type arguments explicitly.</p>
  </blockquote>
  
  <p>Can anyone give me a steer on how to resolve this problem?</p>
  
  <p>Thanks in advance</p>
  
  <p>CM</p>