110,536
社区成员
发帖
与我相关
我的任务
分享
/// <summary>
/// 限制输入数字以外的字符
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
private void txtRuYuanCount_KeyPress(object sender, KeyPressEventArgs e)
{
if (((int)e.KeyChar < 48 || (int)e.KeyChar > 57) && e.KeyChar != 8)
{
e.Handled = true;
}
}