摘要: /// <summary> /// 单例模式 /// </summary> public sealed class Singleton<T> where T:new() { private Singleton() { }//防止new对象 public static T Instance { get { return SingletonCreator.instance; }//延迟加载 } internal class SingletonCreator { static SingletonCreator() { } internal static reado 阅读全文
posted @ 2012-07-25 17:20 正定聚 阅读(412) 评论(0) 推荐(0) 编辑