title: Create an instance of an inherited class from abstract base class constructor
body: <p>Using reflection, is it possible to create an instance of a type that inherits from an abstract base class using the abstract base class' constructor? That is, without the inheriting class having a constructor of its own? Somewhat like below, but it throws an error because you cannot create an instance of an abstract class, of course:</p>
  
  <pre><code>abstract class PersonBase
  {
       string Name;
  
       public PersonBase(string _name) { Name = _name; }
  }
  
  class Person : PersonBase
  {
  
  }
  
  public static T GetPerson&lt;T&gt;(string name) where T : PersonBase, new()
  {
     ConstructorInfo info = typeof(T).BaseType.GetConstructor(new Type[] 
                                                                { typeof(string) });
  
     object result = info.Invoke(new object[] { name }); 
  
     return (T)result;    
  }
  </code></pre>
  
  <p>You can make this work by doing new T { (assign properties here) } but of course thats not a constructor, and the properties would have to be public, etc. </p>