gracias, y aupa athletic beti primeran ;)
pero no era eso lo q queria pero me sirve para otras cosas lo he hecho de la siguiente manera
Código:
mund = new Mundial();
Jugadores[] jug = mund.obtenerJugadorPuesto(3);
for(int i= 0;i<jug.Length;i++)
{
Jugadores j = (Jugadores)jug[i];
TextBox texto = new System.Windows.Forms.TextBox();
Label label = new System.Windows.Forms.Label();
texto.Name = j.codigo.ToString();
texto.Visible = true;
texto.Location = new System.Drawing.Point(155,30 + 22 *(1+ i));
label.Location = new System.Drawing.Point(10,30+ 22 *(i + 1));
label.Text = j.nombre;
texto.Text = "0";
texto.Size = new System.Drawing.Size(140, 21);
this.Controls.Add(texto);
this.Controls.Add(label);
}
this.ClientSize = new System.Drawing.Size(504, 50*jug.Length);
mund = null;
GC.Collect();
}