开发者

Is there a way to “reflect” ILGenerator.Emit commands from IL code?

I am trying to dynamically emit some generic method that I’ve prototyped in C#. Based on IL code presented in ILDASM, is there a way to generate adequate sequence of ILGenerator.Emit() commands that finally would com开发者_Python百科pile into the same IL?

Thanks for your help!


FWIW: I've tended to do this by hand, but I've seen a .NET Reflector plugin which sounds like it'd do what you want: ReflectionEmitLanguage. I've been curious as to what that'd do, but I haven't actually tried it.


There is an Add-In for the popular .NET decompiler "Reflector": Look for ReflectionEmitLanguage on Codeplex

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜