Debug.Indent 메서드

정의

현재 IndentLevel 값을 1씩 늘입니다.

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

예제

다음 예제에서는 들여쓰기 수준을 설정하고 디버깅 메시지를 내보낸다.

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

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

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

적용 대상

추가 정보