多个textbox的值呢?如果是四个 公式是a=b+c*d^2/e
追答double myfunction(string tb, string tc, string td, string te)
{
double b = Convert.ToDouble(tb);
double c = Convert.ToDouble(tc);
double d = Convert.ToDouble(td);
double e = Convert.ToDouble(te);
return b+c*d*d/e;
}
private void button1_Click(object sender, EventArgs e)
{
string tb = textBox1.Text;
string tc = textBox2.Text;
string td = textBox3.Text;
string te = textBox4.Text;
textBox1.Text = myfunction(tb,tc,td,te).ToString();
}