Looping over ILookup, accessing values
- by Jono
I've got a ILookup< string, List<CustomObject> > from some linq I've done.
I'd like to now iterate over the results:
foreach(IGrouping<string, List<CustomObject>> groupItem in lookupTable)
{
groupItem.Key; //You can access the key, but not the list of CustomObject
}
I know I must be misrepresenting a IGrouping as a KeyValuePair, but now I'm not sure how to access it properly.