TextWriter.Null 字段

定义

提供 TextWriter,它不带任何可写入但无法从中读取的后备存储。Provides a TextWriter with no backing store that can be written to, but not read from.

public: static initonly System::IO::TextWriter ^ Null;
public static readonly System.IO.TextWriter Null;
 staticval mutable Null : System.IO.TextWriter
Public Shared ReadOnly Null As TextWriter 

字段值

注解

使用Null将输出重定向到不使用任何操作系统资源的流。Use Null to redirect output to a stream that will not consume any operating system resources.

当在上Null调用方法时,调用只会返回,而不会向任何后备存储写入任何数据。TextWriter.WriteWhen the TextWriter.Write methods are invoked on Null, the call simply returns, and no data is actually written to any backing store.

有关常见 i/o 任务的列表, 请参阅常见 I/o 任务For a list of common I/O tasks, see Common I/O Tasks.

适用于

另请参阅