Debug.AutoFlush 属性  
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
public:
 static property bool AutoFlush { bool get(); void set(bool value); };public static bool AutoFlush { get; set; }static member AutoFlush : bool with get, setPublic Shared Property AutoFlush As Boolean属性值
如果每次写入后在 Listeners 上调用 Flush(),则为 true;否则为 false。
注解
默认值为 false。
除非显式调用 Flush 或 Close,否则刷新流不会刷新其基础编码器。 将 设置为 AutoFlushtrue 表示数据将从缓冲区刷新到流,但不会刷新编码器状态。 这允许编码器将其状态保留 (部分字符) ,以便可以正确编码下一个字符块。 此方案会影响 UTF8 和 UTF7,其中某些字符只能在编码器收到相邻字符后进行编码。
对于.NET Framework应用,还可以通过编辑与应用程序名称对应的配置文件来设置 AutoFlushIndentSize 和 Debug 属性。 配置文件的格式应如以下示例所示。
<configuration>
  <system.diagnostics>
    <trace autoflush="true" indentsize="7" />
  </system.diagnostics>
</configuration>