在winform中,如何在textbox检查有多少个大写字母 在winform中,如何在textbox检查有多少个大写字母,恕我新手!!!求解!!!????winformtextbox 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 int count = Regex.Matches(textBox1.Text, "[A-Z]").Count; MessageBox.Show("有" + count + "个大写字母"); private int i = 0; private void textBox1_KeyPress(object sender, KeyPressEventArgs e) { //大写字母A-Z的ASC码范围是65-90; if ((int)e.KeyChar > 65 & (int)e.KeyChar < 90 || (int)e.KeyChar == 8) { i++; } MessageBox.Show(i.ToString()); } int n = textBox1.Text.Where(x => x >= 'A' && x <= 'Z').Count(); viso流程图中大括号在哪里找到? C # 技术问题 请问一个正则表达式 求助!Excel导入Dataset 关于datagrid自定义删除按钮单击两次才弹出窗口的问题 数据库插入数据---控制并发 遇到年月日时间连一起的情况如何处理? 简单问题!象C#.NET里的方法提示是怎么做出来的!? 在richtextbox中,怎样托放文字? 水晶报表该如何操作???急!有重谢! 多线程问题(文字版) 请教关于数值判断的方法!
MessageBox.Show("有" + count + "个大写字母");
private void textBox1_KeyPress(object sender, KeyPressEventArgs e)
{
//大写字母A-Z的ASC码范围是65-90;
if ((int)e.KeyChar > 65 & (int)e.KeyChar < 90 || (int)e.KeyChar == 8)
{
i++;
}
MessageBox.Show(i.ToString());
}