取得实例类名称的字符串表示:
myClass c = new myClass();
classname = c.GetType().ToString();
取得当前运行的函数的名称 :
System.Reflection.MethodInfo.GetCurrentMethod().Name
Powered by: 博客园 Copyright © 2024 忆龙2009 Powered by .NET 9.0 on Kubernetes