AutoCAD.Net/C#.Net QQ群:193522571:取得当前方法名、父方法名

		private ModelLicence GetModelLicense()
		{
			//取得当前方法名    
			//System.Reflection.MethodBase mb = System.Reflection.MethodBase.GetCurrentMethod();

			//父方法
			System.Diagnostics.StackTrace ss = new System.Diagnostics.StackTrace(true);
			System.Reflection.MethodBase mb = ss.GetFrame(1).GetMethod();
			ModelLicence ML = RH.SoftLicense[mb.Name];
			return ML;
		}
原文地址:https://www.cnblogs.com/swtool/p/11258040.html