title: more than one instance of singleton c#
body: <p>Is there a realisation of a Singleton-like pattern which allows to create more than one instance?</p>
  
  <p>My class definition is:</p>
  
  <pre><code>public class Logger
  {
      private Logger(string logPath)
      {
          this.logPath = logPath;
      }
  
  
      /// &lt;summary&gt;
      /// Creates singleton 
      /// &lt;/summary&gt;
      /// &lt;param name="logPath"&gt;&lt;/param&gt;
      /// &lt;returns&gt;&lt;/returns&gt;
      public static Logger GetInstance(string logPath)
      {
          lock (instanceLock)
          {
              if (logger == null)
              {
                  logger = new Logger(logPath);
              }
          }
          return logger;
      }
  
      public static Logger Instance()
      {
          return logger;
      }
  
      /// &lt;summary&gt;
      /// Destructor
      /// &lt;/summary&gt;
      ~Logger()
      {
          try
          {
              this.Close();
          }
          catch (Exception)
          {
          }
      }
  }
  </code></pre>