【发布时间】:2010-11-12 21:38:46
【问题描述】:
可能重复:
How can I find the method that called the current method?
嗨, 如何从方法中确定方法的调用者?例如:
SomeNamespace.SomeClass.SomeMethod() {
OtherClass();
}
OtherClass() {
// Here I would like to able to know that the caller is SomeNamespace.SomeClass.SomeMethod
}
谢谢
【问题讨论】: