开发者

How to read a method body with reflection

开发者 https://www.devze.com 2023-02-10 01:34 出处:网络
Is it possible to f开发者_StackOverflow社区ind out anything about a Method body with reflection?

Is it possible to f开发者_StackOverflow社区ind out anything about a Method body with reflection?

How?


You can use MethodInfo.GetMethodBody.

That provides you access to anything you want... if you're happy to work through the IL etc yourself.

It's possible that the Mono Cecil library will provide more help - I haven't used it myself.


Talking of Mono.Cecil, it will give you access to the method body in a way that will look very familiar if you have ever peeked into a .NET assembly with ILDASM.

0

精彩评论

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