().ReflectedType.Name; // 类名 获取当前方法的名称空间、类名和方法名称 ...
().ReflectedType.Name; // 类名 获取当前方法的名称空间、类名和方法名称 ...
1、获取当前类名: this.getClass().getSimpleName() 也可以 2、获取当前方法名: ...
public static string GetMethodInfo() { string str = "" ; //取得当前方法命名空间 str += "命名空间名 ...
public static string GetMethodInfo() { string str = "" ; //取得当前方法命名空间 str ...
对当前运行程序,可用如下程序获取当前的命名空间、类名、方法名: https://www.cnblogs.com/cang12138/p/7714651.html ...
string typeName = this.GetType().ToString();//空间名.类名 string typeName = this.GetType().Name;//类名 new System.Diagnostics.StackTrace().GetFrame ...
需要命名空间:using System.Reflection ...