title: Custom generic list of generic class
body: <p>I got a class</p>
  
  <pre><code>public class ID_Name&lt;T&gt;
  {
      public ID_Name(T id)
      {
          this.ID = id;
      }
  
      public T ID { get; set; }
  
      public string Name
      {
          get 
          {
              return Helper.SomeReturnValue;            
          }
      }
  }
  </code></pre>
  
  <p>All I want to do is generate a custom List of ID_Name where I can pass an ID_Name.ID as parameter in Add.
  I tried the following:</p>
  
  <pre><code>public class ID_Name_List&lt;T&gt; : IList&lt;T&gt; where T : ID_Name&lt;T&gt;
  </code></pre>
  
  <p>but then I get the following error:</p>
  
  <blockquote>
    <p>The type "EProtokollStatus" cannot be used as type parameter "T" in
    the generic type or method "ID_Name_List&lt;\T>". There is no boxing
    conversion or type parameter conversion from "EProtokollStatus" in
    ID_Name&lt;\EProtokollStatus>.</p>
  </blockquote>
  
  <p>I read something about this issue here: <a href="https://stackoverflow.com/questions/11823608/no-boxing-or-type-parameter-conversion-for-generic-type-parameter">No boxing or type parameter conversion for generic Type parameter</a> but I can't see a restriction except ID_Name here. 
  This may be wrong somehow, because everything I want to express is "use the same type T as in ID_Name for ID_Name_List", but how do I achieve that?</p>
  
  <p>I found something here: <a href="https://stackoverflow.com/questions/590540/c-declaring-and-using-a-list-of-generic-classes-with-different-types-how">C#: Declaring and using a list of generic classes with different types, how?</a> but I don't want to create many different classes for all possible types.</p>
  
  <p>All I want to achieve is something like </p>
  
  <pre><code>ID_Name_List&lt;EProtokollStatus&gt; myList = new ID_Name_List&lt;EProtokollStatus&gt;();
  myList.Add(EProtokollStatus.ValueX);
  </code></pre>