title: LEFT JOIN DataTables - how do I get this to work?
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/10403006/left-outer-join-2-datatables">LEFT OUTER JOIN 2 datatables</a>  </p>
  </blockquote>
  
  
  
  <p>Let's say this is my exact code:</p>
  
  <pre><code>        DataTable table1 = new DataTable();
          DataTable table2 = new DataTable();
          DataTable joinedtable = new DataTable();
  
          table1.Columns.Add("ID");
          table1.Columns.Add("ColA");
          table1.Rows.Add(1, "A");
  
          table2.Columns.Add("ID");
          table2.Columns.Add("ColB");
          table2.Rows.Add(1, "B");
  </code></pre>
  
  <p>What would my query, LINQ or not, but to left join table1 and table2 together and put it into joinedTable?
  When I try to search for examples, I keep finding examples that start like this:</p>
  
  <pre><code>        var result = from x in table1
              join y in table2 on x.ID equals y.ID 
  </code></pre>
  
  <p>But, I get an error on DataTable1 which I found a suggestion to instead do      "table1.AsEnumerable()" but then I do not have a x.ID. .ID is not defined. I only have things for x that a normal DataRow would have.
  What am I doing wrong here? I cannot seem to figure this out.</p>
  
  <p>Thank you everyone for your help.</p>