Fetch value from datatable



select resourcename from datatable where columnname is datevar and datevar=“s” how to get the value this from datatable .

Note: 1.“s” value is stored in variable, column name is also in variable
2. resourcename is in another column


Declare the variable outside the quotes
datatable.Select(datevar + “=” + s)

it will return as DataRow[], loop the datarow[] and get resourcename