title: Dictionary of <Type, List<Type>>
body: <p>I want to implement a wrapper class for a Dictionary that maps a Type to a generic List of that Type. For example:</p>
  
  <pre><code>**Key**               **Value**
  typeof(InterfaceA), List&lt;InterfaceA&gt;
  typeof(InterfaceB), List&lt;InterfaceB&gt;
  typeof(MyClass), List&lt;MyClass&gt;
  ...
  </code></pre>
  
  <p>I then want to interact with the wrapper class by using types.</p>
  
  <pre><code>public void NewEntry&lt;T&gt;()
  {
      MyDict.Add(typeof(T), new List&lt;T&gt;());
  }
  
  public List&lt;T&gt; GetEntry&lt;T&gt;()
  {
      return MyDict[typeof(T)];
  }
  
  public void RemoveEntry&lt;T&gt;()
  {
      MyDict.Remove(typeof(T));
  }
  </code></pre>
  
  <p>Is there any elegant way to do this?</p>
  
  <p>EDIT: to clarify, the point of this is so that with</p>
  
  <pre><code>GetEntry&lt;MyInterface&gt;()
  </code></pre>
  
  <p>the items in the list are guaranteed to follow the contract of MyInterface. Each entry would have a different Type key, and each List of items would follow the contract of that Type.</p>