title: Compare two datatables and format results
body: <p>I know how to do this in sql, but for c#..I cannot figure out how to make comparison of two datatables.</p>
  <p>Let's say:</p>
  <p>1st datatable:</p>
  <pre><code>Name  |  Balance | Description
  Smith |   1200   | Smith owes 600
  Jordan|   4000   | Hi Jordan
  Brooks|   5000   | I like my cat
  Navaro|   6000   | description here
  Gates |   9010   | omg
  </code></pre>
  <p>2nd datatable:</p>
  <pre><code>Name  |  Balance | Description
  Smith |   1600   | Smith owes 600
  Jordan|   4200   | I'M JORDAN
  Clay  |   9000   | Test description
  Brooks|   5000   | I like my cat
  </code></pre>
  <p>I want to dump results of comparison to a simple html table.</p>
  <p>Soooo...result should be like this:<br />
  <img src="https://i.stack.imgur.com/2vnHz.png" alt="enter image description here" /></p>
  <p>Basically what I need is:</p>
  <blockquote>
  <ol>
  <li><p>Show columns that are different and show data</p>
  </li>
  <li><p>Do not show record if all columns are identical</p>
  </li>
  <li><p>Show records that only exist in first datatable (just names)</p>
  </li>
  <li><p>Show records that only exist in second datatable (just names)</p>
  </li>
  </ol>
  </blockquote>
  <p>In sql, you could do something like merge, then pivot.</p>
  <p>But in C#,
  my findings:
  I can use except, or intersect, but it returns one dattable. Is there any formatting options for an except\intersection functions?</p>
  <p>I'm looking for an advice on how to achieve this the best way. (there's about 100 columns in each datatable). All should be compared by name.</p>