title: Activator.CreateInstance(string) and Activator.CreateInstance<T>() difference
body: <p>No, this is not a question about generics.</p>
  
  <p>I have a Factory pattern with several classes with internal constructors (I don't want them being instantiated if not through the factory).</p>
  
  <p>My problem is that <code>CreateInstance</code> fails with a "No parameterless constructor defined for this object" error unless I pass "true" on the non-public parameter.</p>
  
  <p>Example</p>
  
  <pre><code>// Fails
  Activator.CreateInstance(type);
  
  // Works
  Activator.CreateInstance(type, true);
  </code></pre>
  
  <p>I wanted to make the factory generic to make it a little simpler, like this:</p>
  
  <pre><code>public class GenericFactory&lt;T&gt; where T : MyAbstractType
  {
      public static T GetInstance()
      {
          return Activator.CreateInstance&lt;T&gt;();
      }
  }
  </code></pre>
  
  <p>However, I was unable to find how to pass that "true" parameter for it to accept non-public constructors (internal).</p>
  
  <p>Did I miss something or it isn't possible?</p>