上一页 1 2 3 4 5 6 ··· 32 下一页
摘要: .net 缩略图 1: #region 生成缩略图 2: 3: /// <summary> 4: /// 生成缩略图 5: /// </summary> 6: /// <param name="originalImagePath">源图路径(物理路径)</param> 7: ... 阅读全文
posted @ 2013-04-01 18:05 asp_net老友记 阅读(236) 评论(0) 推荐(0) 编辑
摘要: 根据 1: #region 根据时间计算上午 09:52 或者 晚上20:30 2: private enum DisTime { 凌晨 = 1, 早上, 上午, 中午, 下午, 晚上 }; 3: public static string CaculateAmTm(DateTime sendTime) 4: { ... 阅读全文
posted @ 2013-03-29 13:48 asp_net老友记 阅读(573) 评论(0) 推荐(0) 编辑
摘要: 1: /// <summary> 2: /// 格式化显示时间为几个月,几天前,几小时前,几分钟前,或几秒前 3: /// </summary> 4: /// <param name="dt">要格式化显示的时间</param> 5: /// <returns>几个月,几天前,几小时前,几分钟前,... 阅读全文
posted @ 2013-03-28 14:03 asp_net老友记 阅读(254) 评论(0) 推荐(0) 编辑
摘要: 首先我们写一个接口 1: /// <summary>对Person类的所有操作,定义在接口类里面 2: /// 3: /// </summary> 4: public interface IDalPerson 5: { 6: List<Model.Person> GetAllPerson(); 7: ... 阅读全文
posted @ 2012-12-20 18:06 asp_net老友记 阅读(641) 评论(0) 推荐(2) 编辑
摘要: 里氏替换原则(lsp) •Person p = new Teacher(); 子类可以隐式的转换成父类. • •Teacher t=(Teacher)p; 父类必须强转成子类 •简单工厂 •is和as –typeA is type B 仅判断A是否是B类型,或者 是否是B类型的子类 –typeA as TypeB 先判断,再转换(如果转换失败,则直接给null值,但不会报错) 多态——隐藏基... 阅读全文
posted @ 2012-11-29 18:04 asp_net老友记 阅读(331) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 ··· 32 下一页