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 .