获取当前方法名称

//获取当前方法名称

System.Reflection.MethodBase.GetCurrentMethod().Name

//获取调用本方法的方法名称

new System.Diagnostics.StackTrace().GetFrame(1).GetMethod().Name

//GetFrame(1)中1代表上级,2代表上上级,以此类推  

原文地址:https://www.cnblogs.com/dongzhou/p/7115933.html