// Iterate through the query to get the names
var query = from r in employeeDataTable.AsEnumerable()
where r.Field<string>("LastName") == "Raman"
select r.Field<string>(“FirstName”);
foreach( var name in query )
{
Console.Writeline(name);
}
===========================================================
// You can also turn it to a List<String>
List<String> query = (from r in employeeDataTable.AsEnumerable()
where r.Field<string>("LastName") == "Raman"
select r.Field<string>(“FirstName”)).ToList();
|