using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ConsoleApplication1
{
class Program
{
public void Linq()
{
string[] kelimeler = { "emrah", "kahraman", "canakkale", "ankara", "comu", "ehero" };

var kelimeGruplari =
from k in kelimeler
group k by k[0] into s
select new { ilkHarf = s.Key, kelimeler = s };

foreach (var s in kelimeGruplari)
{
Console.WriteLine("'{0}’ ile baslayan kelimeler :", s.ilkHarf);
foreach (var a in s.kelimeler)
{
Console.WriteLine(a);

}
Console.WriteLine();
}
}
static void Main(string[] args)
{
Program p=new Program();
p.Linq();
}
}
}