Debug.IndentLevel 속성

정의

들여쓰기 수준을 가져오거나 설정합니다.

public:
 static property int IndentLevel { int get(); void set(int value); };
public static int IndentLevel { get; set; }
static member IndentLevel : int with get, set
Public Shared Property IndentLevel As Integer

속성 값

들여쓰기 수준입니다. 기본값은 0입니다.

예제

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

#if defined(DEBUG)
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" );
#endif
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

설명

속성은 IndentLevel 들여쓰기 크기의 IndentSize 적용 횟수를 나타냅니다.

적용 대상

추가 정보