I have collection generated from linq (group by query). this generated list and collection I want to iterate the loop for each key, I have following code which generate list of object by grouping and now I want loop through
var objList=from p in objConfigurationList
group p by p.UserID into g
select new { UserID=g.Key, ReportName=g.ToList() };
foreach (object oParam in objList)
{
}
so how can I access key and reportname list inside this foreach. how to write foreach for that?