I need to dynamically generate a query to access certain columns from a datatable.
string cols="row[Id],row[UserId], row[Code]";
var result= (from DataRow row in dt.Rows
select cols);
but this only returns "row[Id],row[UserId], row[Code]". How can I access the values in those columns?