摘要: 以下示例均为Java代码 ,用c#写可以沿用其思想。饿汉式单例类public class Singleton { private Singleton(){ } private static Singleton instance = new Singleton(); private static Singleton getInstance(){ return instance; } } 饿汉式... 阅读全文
posted @ 2010-10-15 08:53 systemxgl 阅读(600) 评论(0) 推荐(0) 编辑