Please see the code options below:Client App - this is the same for both optionsLetterCounter lc = new LetterCounter(HeLLo);Option 1class LetterCounter    {        string _Word;        List<LetterQuantities> letterQuantities;        //Other functions will be here.        public LetterCounter(string Word)        {            _Word = Word;            LetterQuantities lq = new LetterQuantities();            letterQuantities = lq.GetCapialLetterQuantities(Word);        }    }    class LetterQuantities    {        int _Quantity;        char _Letter;        public LetterQuantities()        {        }        public LetterQuantities(int Quantity, char Letter)        {            _Quantity = Quantity;            _Letter = Letter;        }        public List<LetterQuantities> GetCapialLetterQuantities(string Word)        {            List<LetterQuantities> letterQuantitiesList = new List<LetterQuantities>();            for (char c = 'A'; c <= 'Z'; c++)            {                int count = Word.Split(c).Length - 1;                if (count > 0)                {                    LetterQuantities lq = new LetterQuantities(count, c);                    letterQuantitiesList.Add(lq);                }            }            return letterQuantitiesList;        }    }Option 2class LetterCounter    {        string _Word;        List<KeyValuePair<char, int>> LetterQuantities = new List<KeyValuePair<char, int>>();        //Other functions will be here.        public LetterCounter(string Word)        {            _Word = Word;            GetCapialLetterQuantities();        }        public void GetCapialLetterQuantities()        {            for (char c = 'A'; c <= 'Z'; c++)            {                int count = _Word.Split(c).Length - 1;                if (count > 0)                {                    LetterQuantities.Add(new KeyValuePair<char,int>(c,count));                }            }        }    }The concerns I have are:1) Option 1: LetterQuantities returns a list of itself.  Not sure this is ideal.  However, it is how a Tree data structure works.2) Option 2: This is simpler.  However, I am not sure whether 'Letter' is a valid key. 3) I am not sure whether the object(s) should be Singletons as they are value objects rather than entity objects.I believe I should use option 1 from a TDD point of view.  
Finding the number of capital letters in a word grouped by letter
c#;unit testing;comparative review
The answer is that I wouldn't use either of those approaches. Counting the number of occurrences on a string isn't complex enough that requires a class of it's own. An extension method however would be a reasonable way to do it, as well as using the LINQ to get the desired result:public static IDictionary<char, int> GetOcurrences(this string value){    return value.GroupBy(c => c)        .ToDictionary(c => c.Key, c => c.Count());}Or to count only letterspublic static IDictionary<char, int> GetOcurrences(this string value){    return value        .Where(char.IsLetter)        .GroupBy(c => c)        .ToDictionary(c => c.Key, c => c.Count());}Or to count only capital letterspublic static IDictionary<char, int> GetOcurrences(this string value){    return value        .Where(c => c >= 'A' && c <= 'Z')        .GroupBy(c => c)        .ToDictionary(c => c.Key, c => c.Count());}Or to count only letters provided by a parameterpublic static IDictionary<char, int> GetOcurrences(this string value, string filter){    return value        .Where(c => filter.Contains(c))        .GroupBy(c => c)        .ToDictionary(c => c.Key, c => c.Count());}