摘要: 1.Singleton:保持一个实例,多线程中要注意。需要lock(object);2.AbstractFactory:工厂的目的就是制造产品,在添加新产品的过程中如何更好的组织管理; 阅读全文
posted @ 2011-12-06 18:30 xpwilson 阅读(102) 评论(0) 推荐(0) 编辑
摘要: stringtimestr="";DateTimedt=DateTime.Now;timestr=dt.ToString(); //2011-12-0516:32:26timestr=dt.ToShortDateString(); //2005-11-5timestr=dt.ToShortTimeString(); //16:32timestr=dt.ToLongDateString(); //2011-12-05timestr=dt.ToLongTimeString(); //16:32:26timestr=string.Format("{0:yyyy-HH-d 阅读全文
posted @ 2011-12-06 17:31 xpwilson 阅读(149) 评论(0) 推荐(0) 编辑