如何阅读与反思的方法体 [英] How to read a method body with reflection
本文介绍了如何阅读与反思的方法体的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
是否有可能找到有关方法体与反思什么?
Is it possible to find out anything about a Method body with reflection?
如何?
推荐答案
您可以使用的 MethodInfo.GetMethodBody
。
You can use MethodInfo.GetMethodBody
.
这将使您能够访问任何你想......如果你很高兴通过IL等自己的工作。
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.
这篇关于如何阅读与反思的方法体的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文