文本框设置不能输入半角符号 Regex reg = new Regex(@"^[\x00-\xff]*$"); if(!reg.Ismatch(str)) { return false; //包含半角符号 }