Bir ömür bu susmalar için fazla kısa değil mi
Uzman Üye
string[] harf = { "A", "B", "C", "D", "E", "F", "G", "H", "J", "K", "L", "M", "N", "O", "P", "R", "S", "T", "Y", "Z","1","2","3","4","5","6","7","8","9","0"};
Random rndm = new Random();
string yazi = "";
private void Form1_Load(object sender, EventArgs e)
{
for (int i = 0; i < 5; i++)
{
int sayi = rndm.Next(0, harf.Length);
string sec_harf = harf[sayi].ToString();
yazi += sec_harf;
label1.Text = yazi;
}
}
private void button1_Click(object sender, EventArgs e)
{
if (textBox1.Text==label1.Text)
{
MessageBox.Show("Kod Doğru");
textBox1.Text = "";
}
else
{
MessageBox.Show("Hatalı Giriş");
textBox1.Text = "";
}
}
private void button2_Click(object sender, EventArgs e)
{
textBox1.Text = "";
yazi = "";
for (int i = 0; i < 5; i++)
{
int sayi = rndm.Next(0, harf.Length);
string sec_harf = harf[sayi].ToString();
yazi += sec_harf;
label1.Text = yazi;
}
}
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?