摘要: 1、usingSystem;publicclassSingleton{privatestaticSingletoninstance;privateSingleton(){}publicstaticSingletonInstance{get{if(instance==null){instance=newSingleton();}returninstance;}}}2、publicsealedclassSingleton{privatestaticreadonlySingletoninstance=newSingleton();privateSingleton(){}publicstaticSin 阅读全文
posted @ 2011-12-19 23:35 itor 阅读(188) 评论(0) 推荐(1) 编辑