以编程方式获取C#堆栈跟踪

47
3个回答

83

22

Yes ...

StackTrace stackTrace = new StackTrace();           // get call stack
StackFrame[] stackFrames = stackTrace.GetFrames()

15
string stackTrace = Environment.StackTrace;

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接