void Button1Click(object sender, EventArgs e) { double d=0; string b=textBox2.Text.ToString(); double a=double.Parse(textBox1.Text); double c=double.Parse(textBox3.Text); if("b"=="+") d=a+c; else if("b"=="-") d=a-c; else if("b"=="*") d=a*c; else if("b"=="/") d=a/c; else MessageBox.Show("亲,超出我的能力范畴了哦!","这是一个弱弱的的警告yeah~!"); textBox4.Text=d.ToString();
原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。
如有侵权,请联系 cloudcommunity@tencent.com 删除。
原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。
如有侵权,请联系 cloudcommunity@tencent.com 删除。