访问量: 34369次,访客数: 29410人,浏览量: 2次 
首页  编辑  

取得当前方法的名称

Tags: /C#/RTTI/   Date Created: Tue Jun 10 2008 01:18:26 GMT+0000 (Coordinated Universal Time)

Text = MethodInfo . GetCurrentMethod() . Name;

//or

Text = new StackTrace () . GetFrame( 0 ) . GetMethod() . Name;