Using
System; using
System.Diagnostics; Namespace
StackTraceTestSt
{/ ** //// /// Class1 Summary Description. /// summary> Class class1 {/ ** //// /// The primary invested point of the application. /// summary> [stathread] static void main (string [] args) {method2 (); // output method2} static private void method1 () {stacktrace st = new stacktrace (true); console.writeline (ST .Getframe (1) .getMethod (). Name.toString ());} static private void method2 () {method1 (); console.readline ();}}}