1

How do I create an instance of a type I've just created with AssemblyDefinition/TypeDefinition (I mean in runtime)? Currently, I save the created assembly as a file, read it with System.Reflection.Assembly.Load, find the type, find its constructor, and finally call the constructor.

Is there a way to do that entirely in memory without the temporary file?

4

1 回答 1

1

您可以保存到内存流,然后从字节加载程序集。

于 2013-05-10T14:00:17.757 回答