I want to make a query that returns a specific person (by ID) from person-list (persons).
public Person getThisID(int pID)
{
var res = from p in persons
where p.pID == pID
select p;
return res;
}
But I got an error about casting problems. I tried to cast res
to Person but it doesn't work with that. How can I solve it?