StackTrace.ToString StackTrace.ToString StackTrace.ToString StackTrace.ToString Method

정의

읽을 수 있도록 스택 추적을 만듭니다.Builds a readable representation of the stack trace.

public:
 override System::String ^ ToString();
public override string ToString ();
override this.ToString : unit -> string
Public Overrides Function ToString () As String

반환

읽을 수 있도록 만든 스택 추적입니다.A readable representation of the stack trace.

예제

다음 코드 예제에서는 쓰기 스택 추적 정보 이벤트 로그 항목에 있습니다.The following code example writes stack trace information to an event log entry.

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().Name,
                    st.ToString(),
                    EventLogEntryType.Warning);
Dim frame As New StackFrame(1, True)
Dim strace As New StackTrace(frame)            

EventLog.WriteEntry(frame.GetMethod().Name, _
                    strace.ToString(), _
                    EventLogEntryType.Warning)

적용 대상