다음을 통해 공유


Trace.Unindent 메서드

정의

현재 IndentLevel 을 1씩 줄입니다.

public:
 static void Unindent();
[System.Diagnostics.Conditional("TRACE")]
public static void Unindent ();
[<System.Diagnostics.Conditional("TRACE")>]
static member Unindent : unit -> unit
Public Shared Sub Unindent ()
특성

예제

다음 예제에서는 들여쓰기 수준을 증가 및 감소시키고 추적 메시지를 내보낸다.

Trace::WriteLine( "List of errors:" );
Trace::Indent();
Trace::WriteLine( "Error 1: File not found" );
Trace::WriteLine( "Error 2: Directory not found" );
Trace::Unindent();
Trace::WriteLine( "End of list of errors" );
Trace.WriteLine("List of errors:");
Trace.Indent();
Trace.WriteLine("Error 1: File not found");
Trace.WriteLine("Error 2: Directory not found");
Trace.Unindent();
Trace.WriteLine("End of list of errors");
Trace.WriteLine("List of errors:")
Trace.Indent()
Trace.WriteLine("Error 1: File not found")
Trace.WriteLine("Error 2: Directory not found")
Trace.Unindent()
Trace.WriteLine("End of list of errors")

이 예제는 다음과 같은 출력을 생성합니다.

List of errors:  
     Error 1: File not found  
     Error 2: Directory not found  
End of list of errors  

적용 대상

추가 정보