Debug.Indent メソッド
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
現在の IndentLevel を 1 ずつ増やします。
public:
static void Indent();
[System.Diagnostics.Conditional("DEBUG")]
public static void Indent();
[<System.Diagnostics.Conditional("DEBUG")>]
static member Indent : unit -> unit
Public Shared Sub Indent ()
- 属性
例
次の例では、インデント レベルを設定し、デバッグ メッセージを出力します。
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