1
Answer

unable to cast object of type 'system.int32' to type 'system

Sundar

Sundar

7y
229
1
unable to cast object of type 'system.int32' to type 'system.string' 
 
I got the above error, when i tried  the below line
 
 
int nOut = datatable.Rows.IndexOf(datatable.AsEnumerable().Where(c => c.Field(4) == lblFirst.Value && c.Field(6) == "0").FirstOrDefault()); 
Answers (1)
0
Suthish Nair
NA 31.7k 4.6m 13y
what problem you facing?