The error is shown at select when i write next LINQ query:
DataTable dtbl = //...
int count = (from p in dtbl select p.RecordID).Max();
please help me out.
Try this.
int count = dtbl.Max(p => p.RecordID);
Edit:
You can't easily use Linq on a DataTable
.
See: LINQ query on a DataTable
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With