您的位置:首页 > 其它

获知哪个函数调用了本函数及它的类名

2013-11-24 16:16 267 查看
获知哪个函数调用了本函数及它的类名

StackTrace st = new StackTrace();
StackFrame callerFrame = st.GetFrame(2);
string callerInfo = callerFrame.GetMethod().DeclaringType.Name + "." + callerFrame.GetMethod().Name + "()";
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐