(new StackTrace()).GetFrame(1) // 0为本身的方法;1为调用方法
(new StackTrace()).GetFrame(1).GetMethod().Name; // 方法名
(new StackTrace()).GetFrame(1).GetMethod().ReflectedType.Name; // 类名

相关文章:

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