SortedList
for (char i = 'A'; i <= 'Z'; i++)
{
sl.Add(i.ToString(), 0);
}
lends itself pretty well to getting a distribution (so that the integer is incremented with each occurrence of 'A', 'B', 'C' etc.)
In the 'olden days' (using C++) I'd probably have sorted a fixed array (26 of a char/int struct) - can you suggest a better way in C#?
Would received wisdom dictate using ICompareTo(), Sort or something?

Sam HobbsRank #107 · 20.5K reputationPosted Apr 9, 2010, 1:15 AM EDT
Tj10 reputationPosted Apr 9, 2010, 4:10 AM EDT
Yeah, I'd had a look at the IEnumerable interface in the Help File (but hadn't quite worked out how to use it - all that 'pseudo SQL').
Thanks again.
Sam HobbsRank #107 · 20.5K reputationPosted Apr 9, 2010, 8:42 AM EDT