Can you please try the following code and let me know whether it helps or not?
Let myDataTable
,be the DataTable that you are processing, assume that the type of field is string
(change appropriately if needed)
myDataTable.AsEnumerable()
.Where(x => x.Field<string>("colA") == "aaa")
.OrderBy(y => y.Field<string>("dateof"))
.Take(1)
.Select(s => s.Field<string>("colB"))
Or else this may help you:
var defaultSelectedRow = myDataTable.AsEnumerable()
.Where(x => x.Field<string>("colA") == "aaa")
.OrderBy(y => y.Field<string>("dateof")).FirstOrDefault();
if (defaultSelectedRow != null)
{
string colBValue = defaultSelectedRow.Field<string>("colB");
}