C#
timely_snow
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
调试的时候 才会走某些逻辑
只有在调试(debug)的时候 ,textBox2 中的值才是aaa,在启动程序的时候就 为空了。 this.textBox2.Text = ""; if (true == System.Diagnostics.Debugger.IsAttached) { this.textBox2.Text = "aaa"; }原创 2011-12-08 17:13:18 · 270 阅读 · 0 评论 -
从DataGridView 或 DataTable 数据集中移除不需要的行
/// /// 从 datagridview 列表中移除不需要的行 /// /// 申请单号 /// DataTable /// DataTable 数据集 private DataTable RemoveBu(string req_no, DataTable dtRedraw) { if (null != dtRedraw) { for (int i =原创 2011-12-08 17:23:09 · 359 阅读 · 0 评论 -
避免多次使用if
foreach(var prop in typeof(BusinessInfo).GetProperties()){ if(IsCondition(prop.GetValue(bus))){ sql.AppendFormat(" and {0}=@{0}",prop.Name); } }原创 2011-12-08 17:24:13 · 273 阅读 · 0 评论
分享