【发布时间】:2009-12-16 07:12:21
【问题描述】:
我需要在我的 C#(WPF) 应用程序上实现崩溃报告框架,所以我需要完整的调用堆栈,你们对此有何建议。
【问题讨论】:
标签: c# frameworks crash-reports
我需要在我的 C#(WPF) 应用程序上实现崩溃报告框架,所以我需要完整的调用堆栈,你们对此有何建议。
【问题讨论】:
标签: c# frameworks crash-reports
StackTrace st = new StackTrace(true);
for(int i =0; i< st.FrameCount; i++ )
{
// Note that high up the call stack, there is only
// one stack frame.
StackFrame sf = st.GetFrame(i);
Console.WriteLine();
Console.WriteLine("High up the call stack, Method: {0}",
sf.GetMethod());
Console.WriteLine("High up the call stack, Line Number: {0}",
sf.GetFileLineNumber());
}
【讨论】: