Y
Yasutaka Ito
Hi,
Is there a way to programmatically find out the caller of your function? For
example, let's say I have a function called MyFunction(), and I want to
debug print the caller of this function from within this function.
Private Sub MyFunction
// debug print the name of the caller
End Sub
What I actually want to accomplish by this is, I have a routine that handles
multiple events of a control, as shown below.
Private Sub Button1_Clicks(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click, Button1.DoubleClick
End Sub
I need to know, for which event the handler is being called.
Appreciate any inputs!
thanks!
-Yasutaka
Is there a way to programmatically find out the caller of your function? For
example, let's say I have a function called MyFunction(), and I want to
debug print the caller of this function from within this function.
Private Sub MyFunction
// debug print the name of the caller
End Sub
What I actually want to accomplish by this is, I have a routine that handles
multiple events of a control, as shown below.
Private Sub Button1_Clicks(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click, Button1.DoubleClick
End Sub
I need to know, for which event the handler is being called.
Appreciate any inputs!
thanks!
-Yasutaka