Как найти указанный столбец и его значение строки, если имя столбца в качестве параметра используется LINQ C#
Hi, I have datatable and column name something like "1000,2000,3000,4000,....10000" When i pass the parameter as "1000" as column name it should find the column and return the values. For Example, My parameter is "1000" (Column name) var Qry = (from r in tbl1.AsEnumerable() where r.Field<double>(1000) == EMPNUM select new { }).Count(); Finally i want to get the count and same as i need query to get the values for column name 1000 i tried the above query, but getting error in where r.Field<double>(1000) ==> Error How to write the LINQ Auery in C#
Что я уже пробовал:
var Qry = (from r in tbl1.AsEnumerable() where r.Field<double>(1000) == EMPNUM select new { }).Count();