var NameList = (from r in dataset.Tables[0].AsEnumerable() select new { Name = r.Field<string>("name"), Age = r.Field<string>("age"), Salary = r.Field<string>("salary"), City = r.Field<string>("city") }).ToList(string); return NameList;
Quote:Error 1 Invalid expression term 'string' d:\substituteofsqlhelp (2)\datalayer\DataLayer.cs 50 49 datalayer
//List<string> NameList = (from r in dataset.Tables[0].AsEnumerable() // select r.Field<string>("name")+ r.Field<string>("age")+r.Field<string>("salary")+r.Field<string>("city")).ToList(); //return NameList;
Quote:Error 1 Cannot implicitly convert type 'System.Collections.Generic.List<anonymoustype#1>' to 'System.Collections.Generic.List<string>' d:\substituteofsqlhelp (2)\datalayer\DataLayer.cs 51 25 datalayer
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)