摘要:
一、 单例(Singleton)模式 单例模式的特点:单例类只能有一个实例。单例类必须自己创建自己的唯一实例。单例类必须给所有其它对象提供这一实例。 程序举例:// Singleton pattern -- Structural example using System;// "Singleton"class Singleton{ // Fields private static Singleton instance; // Constructor protected Singleton() {} // Methods public static Singleton Ins 阅读全文
posted @ 2013-05-22 10:03
二哥(阿伟)
阅读(225)
评论(0)
推荐(0)

浙公网安备 33010602011771号