hrnylmz adlı üyeden alıntı: mesajı görüntüle
buyur dostum

int[] dizi = { 1, 1, 1, 12, 2, 2, 3, 3, 4, 4, 4, 4, 4 };
var sayilar = dizi.GroupBy(x => x).Select(x => new { sayi = x.Key, adet = x.Count() }).OrderByDescending(x => x.adet);
foreach (var item in sayilar)
{
        listBox1.Items.Add(string.Format("{0}", item.sayi));
}
Teşekürler hocam aksam deniyecegim



hrnylmz adlı üyeden alıntı: mesajı görüntüle
buyur dostum

int[] dizi = { 1, 1, 1, 12, 2, 2, 3, 3, 4, 4, 4, 4, 4 };
var sayilar = dizi.GroupBy(x => x).Select(x => new { sayi = x.Key, adet = x.Count() }).OrderByDescending(x => x.adet);
foreach (var item in sayilar)
{
        listBox1.Items.Add(string.Format("{0}", item.sayi));
}
Denedim oldu hocam çok teşekürler