c#文本框只能输入数字

int num;

if(!int.TryParse(txtpoint.Text,out num))
{
MessageBox.Show("请输入数字!", "提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
return;
}

posted @ 2020-02-26 10:58  惊风雨  阅读(1798)  评论(0)    收藏  举报