凝霜若雪

博客园 首页 新随笔 联系 订阅 管理
  11 Posts :: 0 Stories :: 10 Comments :: 0 Trackbacks

公告

最新评论

Re:[原创]XtraGrid自定义多表头 曾先锋 2011-02-16 17:45  
好长好长好长
测下这个: int count = (from c in str where c == 'a' select c).Count();
支持。细鸟公司的DataGridView真难用。
楼上的方法好,避免了无用次数,但是不知道input.Indexof(value,i)本身会不会有大的性能损失。
re: [原创]XtraGrid自定义多表头 thinkout 2009-04-22 11:26  
代码不全,能不能发个可下载示例?
re: [原创]XtraGrid自定义多表头 江蓝 2009-03-18 08:54  
您好,您能发一份全部的代码到我的邮箱么?
还不错,给你推荐一个:

public static int ContainCount(string input, char value, bool ignoreCase)
{
if (ignoreCase)
{
input = input.ToLower();
if (Char.IsUpper(value))
{
value = Char.ToLower(value);
}
}

int count = 0;

for (int i = 0; (i = input.IndexOf(value, i)) >= 0; i++)
{
count++;
}

return count;
}
欢迎来 www.150it.cn 网站技术网。