private void AgregarProducto_Click(object sender, EventArgs e) { TextBox[] losid = { textBox1, textBox2, textBox3, textBox4, textBox5 }; TextBox[] nombres = { textBox6, textBox7, textBox8, textBox9, textBox14 }; TextBox[] precios = { textBox10, textBox11, textBox12 }; try { Ne.AgregaProucto(losid, nombres, precios); Mensaje.Text = "Producto Agregado"; } catch { Mensaje.Text = "No se agrego, verifique sus datos"; } }