获知哪个函数调用了本函数及它的类名
2013-11-24 16:16
267 查看
获知哪个函数调用了本函数及它的类名
StackTrace st = new StackTrace();
StackFrame callerFrame = st.GetFrame(2);
string callerInfo = callerFrame.GetMethod().DeclaringType.Name + "." + callerFrame.GetMethod().Name + "()";
StackTrace st = new StackTrace();
StackFrame callerFrame = st.GetFrame(2);
string callerInfo = callerFrame.GetMethod().DeclaringType.Name + "." + callerFrame.GetMethod().Name + "()";
相关文章推荐
- 根据类名和函数名字符串调用相关函数
- 在被调用函数中利用StackTrace确定是被哪个函数调用的
- arguments.callee查询调用b函数的是哪个函数
- java代码获知该方法被哪个类、哪个方法、在哪一行调用
- python基础-面向对像、类名\实例调用、__init__函数、类名\实例增删改查属性
- 一个aspx页面有2个按钮,都是服务器控件,服务器上的DLL如何知道用户点击了哪个按钮,从而按钮的事件函数被调用
- 非static成员函数通过类名::来调用,空指针调用成员方法不出错!
- 在源文件中搜收特定函数在哪个文件中被定义及被哪些文件调用
- 下面的函数哪个是系统调用而不是库函数()?----阿里巴巴2015校招研发在线笔试题
- [NET]Net中的反射使用入门(根据类名和函数名,生成和调用对象的成员函数) .
- 根据类名字符串实例化类,并调用类的方法或函数 转
- 下面的函数哪个是系统调用而不是库函数()?
- [NET]Net中的反射使用入门(根据类名和函数名,生成和调用对象的成员函数)
- 调用哪个虚函数的问题
- [NET]Net中的反射使用入门(根据类名和函数名,生成和调用对象的成员函数) (转)
- 【virtual】"等到运行时再决定调用哪个函数";【inline】"在编译期间将调用之处用被调函数来代替"
- java代码获知该方法被哪个类、哪个方法、在哪一行调用
- java代码获知该方法被哪个类、哪个方法、在哪一行调用
- c++中非静态函数不能用类名调用,为什么CWnd的成员函数GetDC()可以直接调用啊?
- C,C++中输出具体哪个函数被调用了。