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
How to find out current class/method name
Tagged on:

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

  • 13 December 2014 at 8:54 pm

    Solved my problem. Thanks!


Leave a Reply

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.