private void btnSum _click ()默认参数我省略{double x=0,y=0;
bool flag =true;
while (flag )
{
flag =false ;
try
{x=Convert .ToDouble (txtAdd .Text );
y=Convert .To Double (txtAdd2.Text );
}
catch
{MessageBox .Show ("输入错误”);
flag =True ;
}
}
double douSum =x+y;
txtSum .Text =Convert .ToString(douSum );
}
我故意输入字母报错MessageBox 关不掉,求指教,期望结果为出错关掉Message Box 重新输入来自: Android客户端 |
|