StackTrace trace = new StackTrace();
            //获取是哪个类来调用的  
            Type type = trace.GetFrame(1).GetMethod().DeclaringType;
            //获取是类中的那个方法调用的  
            string method = trace.GetFrame(1).GetMethod().ToString();

 

相关文章:

  • 2021-12-10
  • 2022-12-23
  • 2022-12-23
  • 2021-07-29
  • 2021-08-18
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-08-17
  • 2022-12-23
  • 2022-12-23
  • 2022-02-18
  • 2021-07-11
  • 2021-05-03
相关资源
相似解决方案