摘要:
publicsealedclassSingleton<T>whereT:new()...{privatestaticTinstance=newT();privatestaticobjectlockHelper=newobject();privateSingleton()...{}publicstaticTGetInstance()...{if(instance==null)...{lock(lockHelper)...{if(instance==null)...{instance=newT();}}}returninstance;}} 阅读全文
posted @ 2008-01-23 15:35
wkjs
阅读(136)
评论(0)
推荐(0)
浙公网安备 33010602011771号