C# 静态方法中获取类的名称

静态方法中用:this

string className = System.Reflection.MethodBase.GetCurrentMethod().ReflectedType.FullName;

 

非静态方法中还能够用:code

string className = this.GetType().FullName;
相关文章
相关标签/搜索