静态方法中用:

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

 

非静态方法中还可以用:

string className = this.GetType().FullName;

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-11-07
  • 2022-01-28
  • 2022-12-23
  • 2022-12-23
  • 2021-11-25
猜你喜欢
  • 2021-08-29
  • 2021-10-16
  • 2022-12-23
  • 2021-06-04
  • 2021-05-15
相关资源
相似解决方案