111,126
社区成员
发帖
与我相关
我的任务
分享
private void t_KeyPress(object sender, KeyPressEventArgs e)
{
Match num = Regex.Match(e.KeyChar.ToString(), "^[0-9]*$");
Match zm = Regex.Match(e.KeyChar.ToString(), "^[a-z|A-Z]*$");
if (!num.Success && !zm.Success)
{
e.Handled = true;
}
}