2

C#(WPF) アプリケーションにクラッシュ レポート フレームワークを実装する必要があるため、完全なコール スタックが必要です。

4

1 に答える 1

3

スタックトレース

        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());
        }
于 2009-12-16T07:14:12.267 に答える