摘要: 1 /// 2 /// 将指定字符串按指定长度进行剪切, 3 /// 4 /// 需要截断的字符串 5 /// 字符串的最大长度 6 /// 超过长度的后缀 7 /// 如果超过长度,返回截断后的新字符串加上后缀,否则,返回原字符串 8 public static string StringTruncat(string oldStr, int maxLength, string endWith) 9 ... 阅读全文
posted @ 2013-08-31 10:30 李双喆 阅读(155) 评论(0) 推荐(0)
摘要: 首先,SqlHelper要定义为抽象类型的。原因:抽象类型的不能实例化。 其次,抽象的SqlHelper中的函数类型为Static静态的。原因:非静态的抽象类中的函数不引用不能使用。1,框架1 public abstract class SqlHelper2 {3 //数据库连接字符串4 public static string connectionString = ConnectionString; //读取配置文件中的连接字符串5 public SqlHelper()6 { 7 ... 阅读全文
posted @ 2013-08-26 11:35 李双喆 阅读(355) 评论(0) 推荐(0)