int
sayi;
m=0;
listBox1.Items.Clear();
Random rasgele=
new
Random();
ArrayList dizi=
ArrayList();
[] loto=
[6];
deger;
for
(
i=0;i<=48;i++)
{
dizi.Add(i+1);
}
i=0;i<=5;i++)
deger=rasgele.Next()%dizi.Count+1;
loto[i]=Convert.ToInt32(dizi[deger-1]);
dizi.RemoveAt(deger-1);
j=0;j<=5;j++)
k=j+1;k<=5;k++)
if
( loto[j]>loto[k])
sayi=loto[j];
loto[j]=loto[k];
loto[k]=sayi;
m++;
foreach
eleman
in
loto)
listBox1.Items.Add(eleman);
this
.Text=m.ToString();