码迷,mamicode.com
首页 > Windows程序 > 详细

C# StackTrace

时间:2018-02-02 11:37:06      阅读:203      评论:0      收藏:0      [点我收藏+]

标签:get   stack   调用   tostring   bsp   gpo   new   frame   type   

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

 

C# StackTrace

标签:get   stack   调用   tostring   bsp   gpo   new   frame   type   

原文地址:https://www.cnblogs.com/yunyun0574/p/8403530.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!