摘要:
1、usingSystem;publicclassSingleton{privatestaticSingletoninstance;privateSingleton(){}publicstaticSingletonInstance{get{if(instance==null){instance=newSingleton();}returninstance;}}}2、publicsealedclassSingleton{privatestaticreadonlySingletoninstance=newSingleton();privateSingleton(){}publicstaticSin 阅读全文