private void button1_Click(object sender, EventArgs e) { Random generator = new Random(); int r = generator.Next(1000000); string rnd = r.ToString("D6"); string Material = ""; if (comboBox1.SelectedText == "Iron") { Number.Text = Number.Text + "FE" + rnd; } else if (comboBox1.SelectedText == "Aluminium") { Number.Text = Number.Text + "AL" + rnd; } else { Number.Text = Number.Text + "CU" + rnd; } }
if (comboBox1.SelectedText == "Iron")
if (comboBox1.Text == "Iron")
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)