程晓晖

博客园 首页 新随笔 联系 订阅 管理

2010年9月1日 #

摘要: //对于select count(*) as 个数 from myTest 如果myTest表中没有数据 在结果集中【个数列】的数据为0 //对于select max(id) as 最大编号 from myTest 如果myTest表中没有数据 在结果集总【最大编号列】的值为null. //bool temp=Convert.ToBoolean(DBNull.Value); 错 //Convert.To类型() 对DBNull.Value转换的影响,除了ToString()/Convert.ToString()能转换成""外,其他类型都会报错(对象不能从 DBNull 转换为其他类型)。DBN 阅读全文
posted @ 2010-09-01 17:49 fumen 阅读(2258) 评论(0) 推荐(0) 编辑

摘要: string test = "程$晓$"; //数组长度为2 temp[0]="程" temp[1]="晓"; string[] temp = test.Split(new string[] { "$" }, StringSplitOptions.RemoveEmptyEntries);//数组长度为3 temp[0]="程" temp[1]="晓" temp[2]=""; string[] temp = test.Split(new string[] { "$" }, StringSplitOptions.None); 阅读全文
posted @ 2010-09-01 17:44 fumen 阅读(6588) 评论(1) 推荐(0) 编辑