111,094
社区成员




private void MethodTest()
{
//这里怎么通过代码获得自己的名称为“MethodTest”呢?
}
public static string MethodTest()
{
return GetExecuteMethod();
}
public static string GetExecuteMethod()
{
StackFrame[] stacks = new StackTrace().GetFrames();
return stacks[1].GetMethod().Name;
}