Implements a TextReader that reads characters from a byte stream in a particular encoding.
Object
TextReader
StreamReader
[Visual Basic] Public Class StreamReader Inherits TextReader [C#] public class StreamReader : TextReader [C++] public __gc class StreamReader : public TextReader [JScript] public class StreamReader extends TextReader
This class implements a TextReader for reading characters from a Stream. StreamReader is designed for character input in a particular encoding, whereas the Stream class is designed for byte input and output.
StreamReader defaults to UTF-8 encoding unless specified otherwise, instead of defaulting to the ANSI code page for the current system. UTF-8 handles Unicode characters correctly and gives consistent results on localized versions of the operating system.
Namespace: System.IO
Assembly: mscorlib.dll
StreamReader Members | System.IO Namespace | Encoding | Stream | StreamWriter