title: Generics and Type inference
body: <p>I have an abstract generic class <code>BLL&lt;T&gt; where T : BusinessObject</code>. I need to open an assembly that contains a set of concrete BLL classes, and return the tuples (businessObjectType, concreteBLLType) inside a Dictionary. There is the part of the method I could do until now, but I'm having problems to discover T.</p>
  
  <pre><code>protected override Dictionary&lt;Type, Type&gt; DefineBLLs()
  {
     string bllsAssembly = ConfigurationManager.AppSettings["BLLsAssembly"];
  
     Type[] types = LoadAssembly(bllsAssembly);
  
     Dictionary&lt;Type, Type&gt; bllsTypes = new Dictionary&lt;Type, Type&gt;();
  
     foreach (Type type in types)
     {
       if (type.IsSubclassOf(typeof(BLL&lt;&gt;)))
          /* how to know T in the situation below? */
          bllsTypes.Add(??businessObjectType (T)??, type);
     }
  
     return bllsTypes;
  }
  </code></pre>