这妞不错!

会有那么一天...

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::

2012年3月29日

摘要: #region 事件--表格CellContentClick(DGV中checkBox单选)private void dgvInfo2_CellMouseClick(object sender, DataGridViewCellMouseEventArgs e) { if (e.RowIndex > -1 && e.ColumnIndex > -1)//屏蔽表头、列头 { if (e.ColumnIndex == 0)//注释此行代码,即点击行的任何列都勾选当前数据(e.ColumnIndex == 0设置为勾选列) { DataGridViewCheckBoxCe 阅读全文
posted @ 2012-03-29 20:07 这妞不错 阅读(2154) 评论(0) 推荐(0)

摘要: 几个经常用到的字符串的截取string str="123abc456";int i=3;1 取字符串的前i个字符 str=str.Substring(0,i); // or str=str.Remove(i,str.Length-i); 2 去掉字符串的前i个字符: str=str.Remove(0,i); // or str=str.Substring(i); 3 从右边开始取i个字符: str=str.Substring(str.Length-i); // or str=str.Remove(0,str.Length-i);4 从右边开始去掉i个字符: str=str. 阅读全文
posted @ 2012-03-29 13:45 这妞不错 阅读(25169) 评论(1) 推荐(1)