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

静态方法中用:

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

 

非静态方法中还可以用:

string className = this.GetType().FullName;

posted on 2009-03-23 22:13  大豆男生  阅读(1330)  评论(0编辑  收藏  举报

导航