How to get the name of the current method from code

Nick Allen picture Nick Allen · Apr 16, 2010 · Viewed 354.1k times · Source

I know you can do

this.GetType().FullName

To get

My.Current.Class

But what can I call to get

My.Current.Class.CurrentMethod

Answer

Jamie Ide picture Jamie Ide · Apr 16, 2010

Call System.Reflection.MethodBase.GetCurrentMethod().Name from within the method.