Hi,
Try this:
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
Call f()
End Sub
Sub f()
Dim o As New StackTrace()
MsgBox(o.GetFrame(1).GetMethod.Name)
End Sub
--
Best regards,
Carlos J. Quintero
MZ-Tools: Productivity add-ins for Visual Studio .NET, VB6, VB5 and VBA
You can code, design and document much faster.
Free resources for add-in developers:
http://www.mztools.com
"OneFang" <ma***********@hotmail.com> escribió en el mensaje
news:11**********************@g44g2000cwa.googlegr oups.com...
Hi
I hope I make sense here.
I want to be able to obtain the name of the method that calls a method
within my class.
So If I have my class that has a method LogInfo()
And my client code has a method ProcessRequest()
that makes a call to myClass.LogInfo(data)
then I want to be able to obtain the name 'ProcessRequest' from within
the LogInfo() method, without having to pass the method name across.
I'm assuming it's some form of reflection, but really just guessing.
thanks for any info.
Martyn