C# 获取类名

1、获取C#类中类名

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

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

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

3、获取C# 类中方法名

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

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