This documentation is archived and is not being maintained.

Debug.Unindent Method

Decreases the current IndentLevel by one.

[Visual Basic]
<Conditional("DEBUG")>
Public Shared Sub Unindent()
[C#]
[Conditional("DEBUG")]
public static void Unindent();
[C++]
[Conditional("DEBUG")]
public: static void Unindent();
[JScript]
public
   Conditional("DEBUG")
static function Unindent();

Example

The following example sets the indent level and emits debugging messages.

[Visual Basic] 
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")

[C#] 
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");
  

[C++] 
Debug::WriteLine(S"List of errors:");
Debug::Indent();
Debug::WriteLine(S"Error 1: File not found");
Debug::WriteLine(S"Error 2: Directory not found");
Debug::Unindent();
Debug::WriteLine(S"End of list of errors");

[JScript] 
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");
  

This example produces the following output:

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

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

Debug Class | Debug Members | System.Diagnostics Namespace | Indent | IndentLevel | IndentSize

Show: