新人求一个问题
uine 2014-04-10 02:56:01 int op1=0, op2=0;
try
{
op1 = int.Parse(textBox1.Text);
}
catch (System.FormatException)
{
MessageBox.Show("第一个数不是有效的数据!");
return;
}
catch (System.OverflowException)
{
MessageBox.Show("第一个数超出了范围!");
return;
}
怎么把他从try语句转换成if..........else if()语句