日期:2014-05-17  浏览次数:20482 次

怎么实现加减乘除?
比如两个textbox,当点击button时,label.text显示两个的值。

------解决方案--------------------
当你2个文本框里面输入是都是数字的时候

label.Text=(Convert.ToInt32(textbox1.Text)-Convert.ToInt32(textbox2.Text)).ToString();
------解决方案--------------------
label.Text=(Convert.ToDecimal(textbox1.Text)-Convert.ToDecimal(textbox2.Text)).ToString();



------解决方案--------------------
C# code

try
{

}

catch
{

}

------解决方案--------------------
探讨
C# code

try
{

}

catch
{

}