Dynamically create type and call constructor of base-class

后端 未结 2 1862
谎友^
谎友^ 2021-01-01 23:52

I need to create a class dynamically. Most things work fine but i\'m stuck in generating the constructor.

AssemblyBuilder _assemblyBuilder =
        AppDomai         


        
2条回答
  •  轮回少年
    2021-01-02 00:29

    The easiest way to do this would be to compile up your abstract and derived classes into a simple assembly, then open them in Reflector using the "Reflection.Emit" language available as a addin from:

    http://reflectoraddins.codeplex.com/

    Reflector: Reflection.Emit language

    Yes, that's as cool as it sounds :)

提交回复
热议问题