Provides a TextWriter with no backing store that can be written to, but not read from.
[Visual Basic] Public Shared ReadOnly Null As TextWriter [C#] public static readonly TextWriter Null; [C++] public: static TextWriter* Null; [JScript] public static var Null : TextWriter;
Use Null to redirect output to a stream that will not consume any operating system resources.
When the TextWriter.Write methods are invoked on Null, the call simply returns, and no data is actually written to any backing store.
The following table lists examples of other typical or related I/O tasks.
|To do this...||See the example in this topic...|
|Create a text file.||Writing Text to a File|
|Write to a text file.||Writing Text to a File|
|Read from a text file.||Reading Text from a File|
Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, .NET Compact Framework, Common Language Infrastructure (CLI) Standard