StackTrace.ToString メソッド
アセンブリ: mscorlib (mscorlib.dll 内)
構文Dim instance As StackTrace Dim returnValue As String returnValue = instance.ToString
スタック トレースの読み取り可能な形式。
使用例スタック トレース情報をイベント ログ エントリに書き込むコード例を次に示します。
Dim frame As New StackFrame(1, True) Dim strace As New StackTrace(frame) EventLog.WriteEntry(frame.GetMethod().Name, _ strace.ToString(), _ EventLogEntryType.Warning)
StackFrame fr = new StackFrame(1,true); StackTrace st = new StackTrace(fr); EventLog.WriteEntry(fr.GetMethod().Name, st.ToString(), EventLogEntryType.Warning);
StackFrame^ fr = gcnew StackFrame( 1,true ); StackTrace^ st = gcnew StackTrace( fr ); EventLog::WriteEntry( fr->GetMethod()->Name, st->ToString(), EventLogEntryType::Warning );
StackFrame fr = new StackFrame(1, true); StackTrace st = new StackTrace(fr); EventLog.WriteEntry(fr.GetMethod().get_Name(), st.ToString(), EventLogEntryType.Warning);
プラットフォームWindows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。
バージョン情報
参照- StackTrace.ToString メソッドのページへのリンク