using System; using System.Linq; namespace ConsoleApplication1 { class Dong { public char Key { get; set; } public int Count { get; set; } public Dong(char c, int k) { this.Key = c; this.Count = k; } } class Program { static void Main(string[] args) { var word = "qv7qc77qx777qs7777qg77777qbv7bqbckbqqbvkbqgkbqhskbqpckbqbqvm" + "cmhhgmjjbgmppyctbqbivaypga7bbhjbqbxmawhhbqawwqx777kbqbjhbvapkatkhca" + "aamwhmwhwhwhwhwhapkqmpkqc7bhbhwgawiiqwiqbv"; var chars = word.GroupBy(w => w).Where(g => g.Count() > 2).Select(g => new Dong( g.Key,g.Count() )); foreach (Dong d in chars) { Console.WriteLine(d.Key + ": " + d.Count); } Console.ReadKey(); } } }