62,268
社区成员
发帖
与我相关
我的任务
分享
class Singleton
{
public static Singleton Instance() {
if (_instance == null) {
lock (typeof(Singleton)) {
if (_instance == null) {
_instance = new Singleton();
}
}
}
return _instance;
}
protected Singleton() {}
private static volatile Singleton _instance = null;
private ArrayList ary;
public void Additem()
{
//添加方法
}
public void removeitem()
{
//移除数据元素
}
}