摘要:
/// <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 阅读全文