I would like to know how we can query an anraraist of anonymous type using linq
I have an anra type arraylist
var pairs = new ArrayList() { new { id = 1, name = "ram" },` new { id = 2, name = "ramesh" } };
I want something to work as shown below
var query = from stud in pairs
where stud.id==1
select stud;
this does not work, because the compiler of an anonymous type can only get the type at compilation, how do we deal with this, any ideas?
source
share