C#基础[Week3]-20级前后端
Week 3
单例模式
在单例模式中,一个class只能生成 唯一的一个对象!!
public class SMemoryCache
{
private static SMemoryCache cache;
private Dictionary<string, string> datas;
//key: uid value : 12388
// pwd : 93898493
//一定要初始化 dictionary
private SM
原创
2021-11-13 18:13:53 ·
344 阅读 ·
0 评论