How to find out current class/method name

In this short code example I’m going to show you a method to identify what class (including the namespace) you’re currently in and what the name of the current method is. You can also use this technique to find out more information about the method but I won’t go into that detail here.

System.Reflection.MethodBase.GetCurrentMethod().ReflectedType.FullName 'Get Current Class Name and Namespace
System.Reflection.MethodBase.GetCurrentMethod().Name 'Get Current Method Name

1 thought on “How to find out current class/method name”

Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.