TextReader.Null Field

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

Provides a TextReader with no data to read from.

Namespace: System.IO
Assembly: mscorlib (in mscorlib.dll)


Public Shared ReadOnly Null As TextReader
public static readonly TextReader Null


Reading from the Null text reader is similar to reading from the end of a stream:

Read and Peek methods return -1.

ReadBlock method returns zero.

ReadLine and ReadToEnd methods return nullNothingnullptra null reference (Nothing in Visual Basic).

Version Information

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0


Windows Phone

See Also


TextReader Class

System.IO Namespace