在C#中怎样实现象C++的静态实例变量指针那样的功能
如CMyClass
{
public:
static CMyClass* m_singlon;
}
在构造函数中
m_singlon=this;
如CMyClass
{
public:
static CMyClass* m_singlon;
}
在构造函数中
m_singlon=this;
解决方案 »
- C# 如何设置滚动条的最小滚动量
- 学习.NET要学习那些框架技术
- ▓关于double精度的问题,求醍醐灌顶!
- 有个题,大家作一下试试看,看能作不能作
- Developer Express Inc.NET.2005 中的xtraTabPage显示问题 求助
- 程序员资讯网址大全
- 关于socket的简单问题?
- this.dgvListtable.Rows[e.RowIndex].HeaderCell.Value显示行号这个应该写在什么事件中
- 这种网页数据,怎么抓取
- 怎么用将数据库中的数据输出成SqlDataReader或写如其他的SqlDataReader?
- 求:怎样和把医学中使用的B超的图像取下来?
- Reflector.exe的自更新是怎么做的,给个思路。顶者有分,
{
public static m_singlon; public CMyClass()
{ m_singlon=this;}
}
大概就是这样了
public static CMyClass m_singlon;
public myclass
{
public static myclass mc;
private myclass(){};
public myclass initilize(){ if( mc == null ) mc = new myclass(); return mc; }
}
public static myclass initilize(){ if( mc == null ) mc = new myclass(); return mc; }