title: Constructor on type '' not found
body: <p>I have two classes like these.</p>
  
  <pre><code>public class MyClass
  {
      protected readonly int SomeVariable;
  
      public MyClass(){}
  
      public MyClass(int someVariable)
      {
          SomeVariable = someVariable;
      }
  }
  
  public class MyClass2 : MyClass {}
  </code></pre>
  
  <p>Is there a way to create an instance of the class using Activator.CreateInstance?
  I wrote something like this:</p>
  
  <pre><code>public class ActivatorTest&lt;TViewModel&gt;
      where TViewModel : MyClass
  {
      public void Run()
      {
          var viewModel = Activator.CreateInstance(typeof(TViewModel), new Object[] {2}) as TViewModel;
      }
  }
  
  new ActivatorTest&lt;MyClass2&gt;().Run();
  </code></pre>
  
  <p>But I had an exception Constructor on type 'MyClass2' not found.</p>
  
  <p>Any ideas?</p>