Environment.StackTrace
using System; class MainClass { public static void Main() { Console.WriteLine("Stack Trace: {0}", Environment.StackTrace); } }