using System;
using System.Collections.Generic;
using System.Text;
namespace ConsoleApplication15
{
class Program
{
static void Main(string[] args)
{
//Singleton stest = new Singleton();
Singleton.CreateInstance();
Singleton.CreateInstance();
Console.WriteLine("OK");
}
}
public class Singleton
{
private static Singleton objSingleton = null;
private Singleton() { }
public static Singleton CreateInstance()
{
if (null == objSingleton)
{
objSingleton = new Singleton();
}
return objSingleton;
}
}
}