假如某个字符串包含N个封号,我如何才能获得这个N? 比如:111;233;456;7799;一看就知道有四个封号,我想得到的数据就是4,请问代码该如何写? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 string strTest = "111;233;456;7799;"; int intLength; intLength = strTest.Length - strTest.Replace(";", "").Length); string strTest = "111;233;456;7799;"; int intLength; intLength = strTest.Length - strTest.Replace(";", "").Length; string str="111;233;456;7799;";string[] split=str.Split(new char[]{\';\'});Response.write(split.Length);这样可不可以? 有关分页的问题! “欢迎窗口”不包含“UserName”的定义,并且找不到可接受类型为“欢迎窗口”的第一个参数的扩展方法“UserName”(是否缺少 using 指令或程序集 vs 2005 网站编译发布问题 如何取得asp。net中交叉报表中某一单元格的值 (100分)求大表如何分割问题? ajax有时不执行 Server.Transfer使用Ihttphandlers出错 给分100.急急!!!各位大虾帮帮忙. 求一个正则表达式的写法 水晶报表问题 这个效果是怎么实现的,来来看看 初学asp.net请问web窗体的例子在哪里运行阿?怎么通过浏览器看到结果阿?
string strTest = "111;233;456;7799;"; int intLength; intLength = strTest.Length - strTest.Replace(";", "").Length);
string[] split=str.Split(new char[]{\';\'});
Response.write(split.Length);
这样可不可以?