C#基础-获得当前程序的 空间名.类名.方法名

 string typeName = this.GetType().ToString();//空间名.类名

string typeName = this.GetType().Name;//类名

new System.Diagnostics.StackTrace().GetFrame(0).GetMethod().Name 方法名

原文地址:https://www.cnblogs.com/ChineseMoonGod/p/3894446.html