StreamReader Members

The following tables list the members exposed by the StreamReader type.

Public Constructors

Name Description
Public Method StreamReader Initializes a new instance of the StreamReader class for the specified stream.

Public Fields

Name Description
Public Field Static Null Specifies a null stream.

Public Properties

Name Description
Public Property BaseStream Returns the underlying stream.
Public Property CurrentEncoding Gets the current character encoding that the current StreamReader object is using.
Public Property EndOfStream Indicates whether the current stream position is at the end of the stream.

Public Methods

Name Description
Public Method Close Closes the stream.
Public Method DiscardBufferedData Allows a StreamReader object to discard its current data.
Public Method Peek Returns the next available character but does not consume it.
Public Method Read Overloaded. Reads characters from the stream.
Public Method ReadLine Reads a line of characters from the current stream and returns the data as a string.

Protected Methods

Name Description
Protected Method Dispose Closes the stream, releases the unmanaged resources used by the StreamReader object, and optionally releases the managed resources.

See Also

Reference

StreamReader Class
System.Ext.IO Namespace