public void Run() { OutputValue = ""; Symbols.Clear(); string link = _link + TimeStamp; try { OutputValue = _xmlReader.GetValue(link, "outputValue"); if (!String.IsNullOrEmpty(OutputValue)) { var list = OutputValue.ToArray() .GroupBy(x => x) .Select(grp => new Symbol { Char = grp.Key, Count = grp.Count() }) .OrderBy(g => g.Char) .ToList(); foreach (Symbol s in list) { Symbols.Add(s); } } } catch (Exception ex) { OutputValue = ex.Message; } }