LINQ-newb having trouble using grouping. I'm trying to query an IEnumerable called dosesWithHighestScore.
I'm following this example: http://msdn.microsoft.com/en-us/vcsharp/aa336747.aspx#minGrouped
Here's my code:
var doseWithLowestVolumeForForm =
from d in dosesWithHighestScore
group d by d.formulation.form into g
select new {
Form = g.Key,
LowDose = g.Group.Min(d => d.doseAdministrableAmount)
};
The use of "Group" is causing this error:
'System.Linq.IGrouping' does not contain a definition for 'Group' and no extension method 'Group' accepting a first argument of type 'System.Linq.IGrouping' could be found (are you missing a using directive or an assembly reference?)
Here are my usings:
using System;
using System.Text;
using System.Linq;
using System.Xml.Linq;
using System.Collections.Generic;
using System.Collections;
Why am I getting this error?