Freigeben über


Debug.Unindent-Methode

Verringert den aktuellen IndentLevel um eins.

Namespace: System.Diagnostics
Assembly: System (in system.dll)

Syntax

'Declaration
<ConditionalAttribute("DEBUG")> _
Public Shared Sub Unindent
'Usage

Debug.Unindent
[ConditionalAttribute("DEBUG")] 
public static void Unindent ()
[ConditionalAttribute(L"DEBUG")] 
public:
static void Unindent ()
/** @attribute ConditionalAttribute("DEBUG") */ 
public static void Unindent ()
ConditionalAttribute("DEBUG") 
public static function Unindent ()

Beispiel

Im folgenden Beispiel werden die Einzugsebene festgelegt und Debugmeldungen ausgegeben.

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

Mit diesem Beispiel wird die folgende Ausgabe erzeugt:

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

Plattformen

Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

.NET Framework unterstützt nicht alle Versionen sämtlicher Plattformen. Eine Liste der unterstützten Versionen finden Sie unter Systemanforderungen.

Versionsinformationen

.NET Framework

Unterstützt in: 2.0, 1.1, 1.0

Siehe auch

Referenz

Debug-Klasse
Debug-Member
System.Diagnostics-Namespace
Indent
IndentLevel
IndentSize