public void players(string[] jugadores) { if (listBox1.InvokeRequired) { playersDelegate d = new playersDelegate(players); this.Invoke(d, new object[] { jugadores }); } else { int i = 2;//Para que liste solo los jugadores listBox1.Items.Clear(); textBox2.Text = jugadores[0]; textBox3.Text = jugadores[1]; while (i < jugadores.Count()) { if (jugadores[i] != "*") { listBox1.Items.Add(jugadores[i]); } else { i = jugadores.Count(); } i++; } } }
public void players(string[] jugadores) { if (listBox1.InvokeRequired) { playersDelegate d = new playersDelegate(players); this.Invoke(d, new object[] { jugadores }); } else { int i = 2;//Para que liste solo los jugadores listBox1.Items.Clear(); textBox2.Text = jugadores[0]; textBox3.Text = jugadores[1]; while (i < jugadores.Count()) { if (jugadores[i] != "*") listBox1.Items.Add(jugadores[i]); else i = jugadores.Count(); i++; } } }