System.Diagnostics.StackTrace stackTrace = new System.Diagnostics.StackTrace();
System.Diagnostics.StackFrame stackFrame = stackTrace.GetFrame(1);
System.Reflection.MethodBase methodBase = stackFrame.GetMethod();
string methodName = methodBase.Name;
Console.WriteLine("Method name: "+ methodName);
No comments:
Post a Comment