I have a very simple List<string>
setup which contains lots of single characters per item (IE a foreach
would console out to "a" "k" "p" etc)
What I'd like to do is be able to group the items and also count how many of each occurs so I'd get an output similar to:
a - 2
t - 3
y - 3
Any tips on the best way to do this?
I am using .Net 4 if that's any help.
See Question&Answers more detail:os