title: Closest value in DataTable
body: <p>I am currently trying to find the value of a column by comparing the value of another column with a reference number.</p>
  
  <p>Let me explain: </p>
  
  <p>I have a DataTable with 2 columns.</p>
  
  <pre><code>ID    DATA
  1     120
  2     200
  3     -60
  4     478
  </code></pre>
  
  <p>I want to find the ID of the DATA closest from 0.</p>
  
  <p>In this case the correct value will be -60 and the ID 3</p>
  
  <p>I actually do that</p>
  
  <pre><code>int closestId = dtQueryLambda.AsEnumerable().Where(x =&gt; x.Field&lt;double&gt; ("DATA") &gt; 0 || 
                                                          x.Field&lt;double&gt;("DATA") &lt; 0) 
      .Select(x =&gt; x.Field&lt;Int32&gt;("ID"))
      .First();
  </code></pre>
  
  <p>Can someone help me?</p>