Reflection Emit and Type Inheritance: Calling Base Type Constructors

Suppose you want to use Reflection.Emit to generate a dynamic type in memory. Suppose this dynamic type should inherit a custom base type, and you want to put the default implementation into this base type. In plain C#, you would write…

class MyDynamic : MyBase
{
    public MyDynamic()
    {
    }
}

… but with Reflection.Emit, there’s a gotcha.Read More »