Debug.IndentLevel プロパティ
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
インデント レベルを取得または設定します。
public:
static property int IndentLevel { int get(); void set(int value); };
public static int IndentLevel { get; set; }
static member IndentLevel : int with get, set
Public Shared Property IndentLevel As Integer
プロパティ値
インデント レベル。 既定値は 0 です。
例
次の例では、インデント レベルを設定し、デバッグ メッセージを出力します。
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
注釈
IndentLevel プロパティは、サイズIndentSizeのインデントが適用される回数を表します。