I have a list that contains only strings. What I would love to do is group by and return a count.
For instance:
Foo1
Foo2
Foo3
Foo1
Foo2
Foo2
Would result in Foo1: 2, Foo2: 3, Foo3: 1. I've tried with Linq but the list has a GroupBy that might do the trick but i messed it up, can't figure the use :(
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…