MethodInfo method = (MethodInfo)(new StackTrace().GetFrame(1).GetMethod());
获取调用该方法的上一个方法
本文介绍了一种通过获取当前堆栈跟踪的方法来实例化MethodInfo对象的技术。具体实现方式为使用newStackTrace().GetFrame(1).GetMethod()来获取MethodInfo。
本文介绍了一种通过获取当前堆栈跟踪的方法来实例化MethodInfo对象的技术。具体实现方式为使用newStackTrace().GetFrame(1).GetMethod()来获取MethodInfo。

被折叠的 条评论
为什么被折叠?