title: In C#: How to declare a generic Dictionary with a type as key and an IEnumerable<> of that type as value?
body: <p>I want to declare a dictionary that stores typed <code>IEnumerable</code>'s of a specific type, with that exact type as key, like so: (Edited to follow johny g's comment)</p>
  
  <pre><code>private IDictionary&lt;Type, IEnumerable&lt;T&gt;&gt; _dataOfType where T: BaseClass; //does not compile!
  </code></pre>
  
  <p>The concrete classes I want to store, all derive from BaseClass, therefore the idea to use it as constraint. The compiler complains that it expects a semicolon after the member name.</p>
  
  <p>If it would work, I would expect this would make the later retrieval from the dictionary simple like:</p>
  
  <pre><code>IEnumerable&lt;ConcreteData&gt; concreteData;
  _sitesOfType.TryGetValue(typeof(ConcreteType), out concreteData);
  </code></pre>
  
  <p><strong>How to define such a dictionary?</strong></p>