Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

real world example of sinleton design pattern

class Singleton
{
    private static Singleton instance;

    private Singleton() {}

    public static Singleton Instance
    {
        get
        {
            if (instance == null)
                instance = new Singleton();

            return instance;
        }
    }
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #real #world #sinleton #design #pattern
ADD COMMENT
Topic
Name
8+6 =