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, setPublic Shared Property IndentLevel As Integer属性值
缩进级别。 默认值为 0。
示例
以下示例设置缩进级别并发出调试消息。
#if defined(DEBUG)
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" );
#endif
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 缩进的次数。