日期:2014-05-20 浏览次数:21108 次
switch (comboBox1.Text) { case "+": textBox3.Text = (Convert.ToDouble(textBox1.Text) + Convert.ToDouble(textBox1.Text)).ToString(); break; case "-": textBox3.Text = (Convert.ToDouble(textBox1.Text) - Convert.ToDouble(textBox1.Text)).ToString(); break; case "*": textBox3.Text = (Convert.ToDouble(textBox1.Text) * Convert.ToDouble(textBox1.Text)).ToString(); break; case "/": textBox3.Text = (Convert.ToDouble(textBox1.Text) / Convert.ToDouble(textBox1.Text)).ToString(); break; }