Vb.net 2008 detect current sub name

i need to write an event log. how to know what is the current sub routine name??
aaronthamAsked:
Who is Participating?
 
DhaestConnect With a Mentor Commented:
System.Reflection.MethodBase.GetCurrentMethod().Name yields current method name.

System.Reflection.MethodBase.GetCurrentMethod().ReflectedType.FullName yields fullyqualified name of the method's class

System.Reflection.MethodBase.GetCurrentMethod().ReflectedType.Name yields method's class name without Namespace

System.Reflection.MethodBase.GetCurrentMethod().ReflectedType.Namespace yield namespace
0
 
DhaestCommented:
You can use Reflection:

MethodBase.GetCurrentMethod().Name
0
 
daveamourCommented:
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.