letters occurence in a string
c#, c#-4.0
Solution
Without compiling and testing it something like the linq below should do the trick:
from c in str
group by c into g
select new { letter= g.Key, count= g.Count()}
Problem
How to count character occurrences in a string? For example, say I have the following input string: ``` test text ``` output should be: ``` t 4 e 2 s 1 x 1 ```