类的实例化
private static readonly object _lockObj = new object();private static halcomcn _instance;
public static halcomcn Instance
{
get
{
if (_instance == null)
{
lock (_lockObj)
{
if (_instance == null)
{
_instance = new halcomcn();
}
}
}
return _instance;
}
}
页:
[1]