Feb 082010
 

Here’s slide I’ve made for my presentation to my college on Singleton Design Pattern. There’s example in C# and JavaScript.

  One Response to “Singleton Design Pattern”

  1. public sealed class Singleton {
    private static Singleton instance;

    private Singleton() {}
    public static Singleton getInstance () {
    if (instance==null)
    instance = new Singleton();

    return instance;
    }
    }

    // looks better right?

 Leave a Reply

(required)

(required)

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

© 2012 Programming & technology Suffusion theme by Sayontan Sinha