Find a value from Datatable compare with its max() value - LINQ Query
<p>thanks for helps.
Actually I have a datatable Invoice, having fields like invoice_no, Invoice_dt, material_name, unit_price, etc..</p>

<p>But I need to find the unit_price of the item which is the last date entry for that material {max(invoice_dt)} is it possible?</p>

<pre><code>var query = from t1 in invoice
        where t1.material_name == MyMaterial &amp;&amp; t1.invoice_dt == (invoice.max(invoice_dt))
        select t1.unit_price;
</code></pre>

<p>From the above my intention is to get the latest date entry of unit_price, that will be the current market price...</p>
