L
If you're using .Net 2.0 or later, than generics are your friend. I'd do something like below. You don't have to use a SortedList as there are other generic collections available like System.Collections.Generic.KeyValuePair<TKey,TValue) which will also work. System.Collections.Generic.SortedList<char, int> summary = new System.Collections.Generic.SortedList<char, int>(); char[] characters = new char[] { 'a', 'b', 'c' }; //Initialize Summary foreach (char a in characters) { if (!summary.ContainsKey(a)) summary.Add(a, 0); } foreach (char c in something) { if (summary.ContainsKey(c)) summary[c]++; else System.Console.WriteLine("Key {0} not found.", c); }