}//饿汉式 只要使用类就会被构造 /// <summary> /// 原型模式:解决对象重复创建的问题 /// 通过MemberwiseClone来clone新对象,避免重复创建 /// </summary> /// <returns></returns> public static SingletonSecond CreateInstancePrototype() { SingletonSecond second = (SingletonSecond)_SingletonSecond.MemberwiseClone(); return(second); }