Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private void btnCalcola_Click(object sender, EventArgs e)
- {
- Random casuale;
- int numero;
- string s = "";
- string g = "";
- int ncampioni = int.Parse(txtcampioni.Text);
- int nestraz = int.Parse(txtestraz.Text);
- List<int> lista = new List<int> { };
- for (int i = 0; i < ncampioni; i++)
- {
- for (int j = 0; j < nestraz; j++)
- {
- casuale = new Random();
- numero = casuale.Next(0,lstbX.Items.Count-1);
- lista.Add(int.Parse( (string)lstbX.Items[numero]));
- s = s += "_" + lista[j];
- }
- lstcampioni.Items.Add(s);
- s = "";
- }
Add Comment
Please, Sign In to add comment