title: Is Lazy<T> a good solution for a thread safe lazy loaded singleton?
body: <p>We implemented a lazy loaded singleton using double locking on get to make sure the instance is only initialized once (and not twice due to thread race conditions).</p>
  
  <p>I was wondering if simply using <code>Lazy&lt;T&gt;</code> is a good solution for this problem?</p>
  
  <p>I.E.</p>
  
  <pre><code>private static Lazy&lt;MyClass&gt; _instance = new Lazy&lt;MyClass&gt;(() =&gt; return new MyClass());
  
  public static MyClass Instance
  {
      get
      {
          return _instance.Value;
      }
  }
  </code></pre>