Aracılığıyla paylaş


Trace.Indent Yöntem

Tanım

Geçerli IndentLevel olanı bir artırır.

public:
 static void Indent();
[System.Diagnostics.Conditional("TRACE")]
public static void Indent ();
[<System.Diagnostics.Conditional("TRACE")>]
static member Indent : unit -> unit
Public Shared Sub Indent ()
Öznitelikler

Örnekler

Aşağıdaki örnek, girinti düzeyini artırır ve azaltıp izleme iletilerini yayar.

Trace::WriteLine( "List of errors:" );
Trace::Indent();
Trace::WriteLine( "Error 1: File not found" );
Trace::WriteLine( "Error 2: Directory not found" );
Trace::Unindent();
Trace::WriteLine( "End of list of errors" );
Trace.WriteLine("List of errors:");
Trace.Indent();
Trace.WriteLine("Error 1: File not found");
Trace.WriteLine("Error 2: Directory not found");
Trace.Unindent();
Trace.WriteLine("End of list of errors");
Trace.WriteLine("List of errors:")
Trace.Indent()
Trace.WriteLine("Error 1: File not found")
Trace.WriteLine("Error 2: Directory not found")
Trace.Unindent()
Trace.WriteLine("End of list of errors")

Bu örnek aşağıdaki çıkışı oluşturur:

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

Şunlara uygulanır

Ayrıca bkz.