User-1024101449 posted
Hi,
How to check value in between two column of the datatable.
For example,
My input value 10.
Atable |
Btable |
2 |
8 |
4 |
10 |
7 |
11 |
10 |
6 |
10 |
20 |
6 |
20 |
5 |
21 |
Now the input value should find in between A and B Table.
If exists within the limit, then it should return true else false.
How to write linq query.
my query is below. but, it is not working.
var Result6 = (from r in tblRes1.AsEnumerable()
where r.Field<string>("FROM DIA") <= PipeDia && r.Field<string>("TO DIA") >= PipeDia // Pipe Diameter
select new
{
}).Count();
Error : Operator '<=' cannot be applied to operands of type 'sting' and 'string'
what is the problem in that..?