title: How to compare two DataTable and return the diffrence?
body: <p>Lets say I have two DataTable dt1 and dt2, I add row to dt1 and do AcceptChanges, and then dt2 = dt1.Copy and continue add row to dt2</p>
  
  <p>Example1:-</p>
  
  <pre><code>    dt1                    dt2
      ---------------        ---------------  
      | item  | qty |        | item  | qty |
      ---------------        ---------------
      | Apple |  1  |        | Apple |  1  |
      | Orange|  1  |        | Orange|  1  |
      ---------------        | Banana|  2  |
                             ---------------
  
  Dim dt_compare as DataTable = dt2.GetChanges()
  
      dt_compare                  
      ---------------       
      | item  | qty |        
      ---------------       
      | Banana|  2  |
      ---------------
  </code></pre>
  
  <p>Above result is what I get, and it is what I want also, but please take a look on Example2</p>
  
  <p>Example2:-</p>
  
  <pre><code>    dt1                    dt2
      ---------------        ---------------  
      | item  | qty |        | item  | qty |
      ---------------        ---------------
      | Apple |  1  |        | Apple |  1  |
      | Orange|  1  |        | Orange|  10 |
      ---------------        ---------------
  
  Dim dt_compare as DataTable = dt2.GetChanges()
  
      dt_compare                  
      ---------------       
      | item  | qty |        
      ---------------       
      | Orange|  10 |
      ---------------
  </code></pre>
  
  <p>If I just change the value it will return the same value when I use GetChanges(). How can I get result 9 instead of 10?</p>