Leer en inglés

Compartir a través de


Debug.Indent Método

Definición

Aumenta el IndentLevel actual en uno.

[System.Diagnostics.Conditional("DEBUG")]
public static void Indent ();
Atributos

Ejemplos

En el ejemplo siguiente se establece el nivel de sangría y se emiten mensajes de depuración.

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");

Este ejemplo produce el siguiente resultado:

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

Se aplica a

Consulte también