title: Why use Lazy<T> instead of static factory class for singletons?
body: <p>Before I found the <code>Lazy&lt;T&gt;</code> type, I was using the following pattern for implementing global singletons:</p>
  
  <pre><code>class DataModel
  {
      public static XmlSerializer Serializer
      {
          get { return SerializerFactory.instance; }
      }
  
      static class SerializerFactory
      {
          internal static readonly XmlSerializer instance =
              new XmlSerializer(typeof(DataModel));
      }    
  }
  </code></pre>
  
  <p>This pattern provides the following advantages:</p>
  
  <ol>
  <li>Type initialization is lazy.</li>
  <li>Type initialization is thread-safe.</li>
  <li>Singleton access is simply a direct field access with no method calls.</li>
  </ol>
  
  <p>Recently I've come across a lot of posts suggesting <code>Lazy&lt;T&gt;</code> for implementing similar singleton access patterns. Is there any benefit that <code>Lazy&lt;T&gt;</code> (or <code>LazyInitializer</code>) would bring to this implementation?</p>