Kendi yapmış oldugum bir sayısal loto programı.Sizlerle paylaşmak istedim.


using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace ödev111
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}

private void Form1_Load(object sender, EventArgs e)
{

}

private void button1_Click(object sender, EventArgs e)
{
int[] sayi1 = new int[6];
Random rnd = new Random();

int sayitüret = 0;
int rassayiat = 0;

while (sayitüret < 6)
{
rassayiat = rnd.Next(1, 50);


if (Array.IndexOf(sayi1, rassayiat) == -1)
sayi1[sayitüret++] = rassayiat;
}
Array.Sort(sayi1);
label2.Text = sayi1[0].ToString();
label3.Text = sayi1[1].ToString();
label4.Text = sayi1[2].ToString();
label5.Text = sayi1[3].ToString();
label6.Text = sayi1[4].ToString();
label7.Text = sayi1[5].ToString();
}

private void button2_Click(object sender, EventArgs e)
{
DialogResult sonucum;
sonucum = MessageBox.Show("Çıkmak istediğinizden emin misiniz?", "Uyarı", MessageBoxButtons.OKCancel);

if (sonucum == DialogResult.OK)
Application.Exit();

}

private void toolStripTextBox1_Click(object sender, EventArgs e)
{
MessageBox.Show("------------------------");

private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
{
linkLabel1.LinkVisited = true;
System.Diagnostics.Process.Start("http://www.millipiyango.gov.tr/");
}
}
}