I want to get column 2 value by using column 1 value from datatable using linq
example: consider the below datatable
ID Age
768341 45
435689 27
456170 38
i will be knowing ID, using ID i need to get there age,
anyone can help me with this?
We do not use CoptToDataTable when we can expect also an empty filter result. In such case CopyToDataTable will throw an exception. FirstOrDefault will return null in the case no matching row was found