temp=txtConvertToInt(textbox.Text)
public static int txtConvertToInt(string txt)
{
int result = 0;
bool f = int.TryParse(txt, out result);
return result;
}
转载自https://zhidao.baidu.com/question/262555842836813525.html