【发布时间】:2013-02-12 20:30:38
【问题描述】:
有没有办法知道一个简单函数的发送者?
Public Function functionA() As Integer
functionB()
End Function
Public Function functionB() As Integer
' i need to do another processing if it comes from functionA
End Function
有什么想法吗?
【问题讨论】:
-
您可以使用 StackTrace 获取快照并查看调用方法。 csharp-examples.net/reflection-calling-method-name