title: Remove duplicate rows from c# datatable using dataview.totable() not working for empty row values
body: <p>I need to check existing datarows(<strong>for all columns</strong>) for possible duplicates in a datatable before adding a new row. Currently using the approach of adding a new datarow(using itemarray) to the table dt1 and comparing the row count of the existing table(dt1) and new table(dt1.dataview.totable(true)). However this does not seem to be working when the rows contain empty/null values</p>
  <pre><code>| Col1 | Col2 |
  |------|------|
  |Abc   |      |
  |      |Xyz   |
  </code></pre>
  <p>When i try to add a new datarow - <code>(Abc, )</code>, it gets interpreted as a distinct row. Is there a way to handle such empty/null values using dataview.totable(), or linq approach to check if a row already exists(values of all columns need to be checked), or any other easier way? *the datatable columns get changed dynamically, so can't rely on column names</p>