|
using System;
using System.Collections.Generic;
using System.Text;
namespace OOPS
{
public class Singleton
{
private static Singleton vSingleton = null;
private static int vCount = 0;
private Singleton()
{
}
public static Singleton GetSingleton()
{
vCount++;
if(vSingleton== null)
vSingleton = new Singleton();
return vSingleton;
}
public int CountMe
{
get
{
return vCount;
}
}
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.