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

C# 获取类名

时间:2019-04-17 18:15:25      阅读:317      评论:0      收藏:0      [点我收藏+]

标签:etc   method   gty   命名   ase   方法   get   name   current   

1、获取C#类中类名

System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.Name;

2、获取C#类中类名(包含命名空间)

System.Reflection.MethodBase.GetCurrentMethod().DeclaringType.FullName;

3、获取C# 类中方法名

System.Reflection.MethodBase.GetCurrentMethod().Name;

C# 获取类名

标签:etc   method   gty   命名   ase   方法   get   name   current   

原文地址:https://www.cnblogs.com/ZJ199012/p/10725054.html

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