摘要: 第一种方法:正则表达式 string text = "是不是汉字"; for (int i = 0; i = 0x4e00 && (int)c[i] 127) Console.WriteLine("是汉字"); ... 阅读全文
posted @ 2015-01-08 10:52 ZCoding 阅读(5123) 评论(0) 推荐(0) 编辑
摘要: 第一种方法:try{ if (int.Parse(textBox1.Text) > 0) { //操作代码 } else { MessageBox.Show("必须是正整数"); }}catch (FormatException){ ... 阅读全文
posted @ 2015-01-08 10:32 ZCoding 阅读(4354) 评论(0) 推荐(0) 编辑