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 »

In-Memory Run-Time Code Generation With .NET – Part 4

This article is split into 5 posts.

  1. Introduction
  2. Templating Engines
  3. Code Generation From Source
  4. Code Generation From Model
  5. Loading

Read More »