all groups > vb.net > march 2004 >
You're in the

vb.net

group:

Identifying a procedure's calling parent


Re: Identifying a procedure's calling parent Ken Tucker [MVP]
3/31/2004 9:19:31 AM
vb.net: Hi,

Maybe this will help.

Private Sub MySub2()

Dim S As New StackTrace(True)

Dim strLine() As String = S.ToString.Split(ControlChars.NewLine)

Debug.WriteLine(strLine(2))

End Sub



Ken

---------------

[quoted text, click to view]

Re: Identifying a procedure's calling parent Cor
3/31/2004 3:58:28 PM
Hi Wayne,

In every event is there the "sender" which is tranported as object, would be
very consistent in my opinon when you did use that also for it.

Cor

[quoted text, click to view]

Identifying a procedure's calling parent Wayne M J
3/31/2004 11:33:16 PM
Sub mySub ()
MySub2()
End Sub

Sub MySub2()
Console.WriteLine("I was called by...")
End Some

Using the above example, is there anyway for MySub2 to identify its calling
parent?

If so, how?

Re: Identifying a procedure's calling parent Wayne M J
4/1/2004 7:24:16 AM
[quoted text, click to view]

Thanks for that - that actually does the trick, and them some.

AddThis Social Bookmark Button