find what class name ,call other class method..

  • Thread starter Thread starter tony
  • Start date Start date
T

tony

hi.


is there a way to find inside my class.method , what is the class name that
call this method ?

i know i can send parameter as :
Me.GetType.FullName()


but ,i want tot know if there is a way to find this info inside the class
method being called.

hope im clear.
have a nice day.
 
Hi Tony,

You could use the stack related classes in the reflection namespace.

For eg:
Dim st As StackTrace = New StackTrace(True)
MessageBox.Show(st.GetFrame(1).GetMethod().DeclaringType.Name)

HTH,
Rakesh Rajan
 
Back
Top