Say I have an (ordered) sequence of animals:
Eagle Elephant Tarantula Terrapin Tiger
and I group by first letter:
Animals.GroupBy(animal => animal.First())
will the elements of the IGrouping
s in the resulting sequence be in the same order as the input sequence?
Yes, they will be: GroupBy (MSDN).