摘要:
本文内容:利用单例的方式实现一个作为全局变量的简单方法。用代码说明,比较清晰一点。UserPool.csView Code 1 class UserPool 2 { 3 publicstaticreadonly UserPool GlobalUserPool =new UserPool(); 4 private Hashtable ht =new Hashtable(); 5 6 private UserPool() 7 { 8 } 9 publicvoid Add(string key, UserInformation userInfor)10 ... 阅读全文