
小技巧
丶云淡风轻丶
。NET 程序员
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
C#(winform)文本框只能输入数字和退格键和小数点
private void TextBox_KeyPress(object sender, KeyPressEventArgs e) { if(e.KeyChar!=’/b’&&!Char.IsDigit(e.KeyChar)&&e.KeyChar!=’.’) { e.Handled = true; } } ...... 或者 private void TextBo转载 2011-11-08 15:54:32 · 397 阅读 · 0 评论 -
判断字符类型部分方法
1.判断文本框里的值是否为空 if(string.IsNullOrEmpty(textbox1.text.trim())) √ 等同于 if(textbox1.text.trim()!="" || textbox1.text.trim()!=null) 2.判断一个文本框里面的值是否为整数 bool b=true; foreach(char c int te翻译 2012-02-08 16:30:38 · 224 阅读 · 0 评论