Compare datatables where columns dont have same Name Precision or Scale
<p>Using C#, I am trying to compare 2 data tables who do not have the same column naming / column precision / column scale. They are basically from two different source systems; however they have a column to column mapping and the data is expected to match. Further when comparing, a tolerance of up to  <code>0.0001</code> (difference) is allowed in case of numeric fields. </p>

<p>My understanding is LINQ can't be used as they don't match structurally. Is there a better way of doing this other than by looping through each cell resulting into a horrible complexity of O(n^2). The tables are not huge, so I may get away with it but just wondering if there is a better approach.</p>

<p>Further, even if I loop through, statement like  </p>

<pre><code>valueInCellOfFirstTable.Equals(valueInCellOfSecondTable)
</code></pre>

<p>Apparently won't work where I want to be agnostic of the data type as well as use tolerance of <code>0.0001</code> if it was a numeric field.</p>

<p>Any ideas how to implement this in an effective way? </p>