title: How to initialize a list of a generic class
body: <p>I have a generic class</p>
  
  <pre><code>public class MetadataDifference&lt;T&gt;
  {
      public T NewMetadata { get; private set; }
      public T OldMetadata { get; private set; }
      // Other useful properties
  
      public MetadataDifference(T newMetadata, T oldMetadata)
      {
          NewMetadata = newMetadata;
          OldMetadata = oldMetadata;
      }
  }
  </code></pre>
  
  <p>I have wrapper class which has a list of MetadataDifference&lt;> as a property.</p>
  
  <p>This doesn't work:</p>
  
  <blockquote>
    <p>The type or namespace name 'T' could not be found</p>
  </blockquote>
  
  <p>Code:</p>
  
  <pre><code>public class DifferencesResult
  {
      public IEnumerable&lt;MetadataDifference&lt;T&gt;&gt; MetadataChanges { get; set; }
  
      // other fields
  }
  </code></pre>
  
  <p>How can I initialize a list of a generic object? Is it possible?</p>