Поделиться через


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.

Примеры

В следующем примере устанавливается уровень отступа и отправляется отладочные сообщения.

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 .

Применяется к

См. также раздел