Public Class Singleton
{
PRIVATE Static Bool Instance_flag = FALSE
Private singleton () // Change the Singleton function to private to prevent it from calling New to create it.
{
Console.writeline ("You can only see me once");
}
Public Static Singleton getInstance ()
{
IF (! installation_flag)
{
INSTANCE_FLAG = true;
Return new startleton ();
}
Else Return NULL;
}
}
}