do is possible to get the path of the method that is begin executed?

  • Thread starter Thread starter David
  • Start date Start date
D

David

for example:

Namespace MyNamespace
Public Class MyClass
Public Sub mySub()

Console.WriteLine("Executing..." & MyCurrentSub())
' The MyCurrentSub is just an example of a pseudocode, that will
be replaced with the real function name
' or whatever I need to get the current Method, the output will
be: "Executing... MyNamespace.MyClass.mySub"

End Sub
End Class
End Namespace


Thanks
 
David said:
for example:

Namespace MyNamespace
Public Class MyClass
Public Sub mySub()

Console.WriteLine("Executing..." & MyCurrentSub())
' The MyCurrentSub is just an example of a pseudocode, that will
be replaced with the real function name
' or whatever I need to get the current Method, the output will
be: "Executing... MyNamespace.MyClass.mySub"

End Sub
End Class
End Namespace

See MethodBase.GetCurrentMethod().
 
Back
Top