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 file name.

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 Gets a value that indicates whether the current stream position is at the end of the stream.

Public Methods

Name Description
Public Method Close Closes the StreamReader object and the underlying stream, and releases any system resources associated with the reader.
Public Method Dispose Closes the underlying stream, releases the unmanaged resources used by the StreamReader, and optionally releases the managed resources.
Public Method Peek Returns the next available character but does not consume it.
Public Method Read Reads a maximum of count characters from the current stream into buffer, beginning at index.
Public Method ReadLine Reads a line of characters from the current stream and returns the data as a string.
Public Method ReadToEnd Reads the stream from the current position to the end of the stream.

See Also

Reference

StreamReader Class
System.IO Namespace