dmjio
7/27/2011 - 7:17 PM

Singleton

Singleton

using System;

public class Singleton
{
   private static Singleton instance;

   private Singleton() {}

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