olu adesinaPro Student 19,018 Points
where does the g.key property come from in this example
when iterate through the List<> with the FROM and IN keywords we use a variable like b in birds to access properties of each object but there is no Key property in the bird object so where is the g.key property coming from
Steven Parker177,847 Points
You're right that a "bird" object doesn't have a "Key", but this is chained onto a GroupBy; and an IGrouping object (which the GroupBy creates) does have a Key. The key was selected by the function given to the GroupBy, so in this case it's the bird's "Color" value.
The "g" parameter name was probably chosen as a reminder that it represents an IGrouping object and not a bird.