StreamReader Constructor (Stream)

[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]

Initializes a new instance of the StreamReader class for the specified stream.

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

public StreamReader(
	Stream stream
)

Parameters

stream
Type: System.IO..::..Stream
The stream to be read.

This constructor initializes the encoding to UTF8Encoding, the BaseStream property using the stream parameter, and the internal buffer size to 1024 bytes.

The StreamReader object calls Dispose()()()() on the provided Stream object when StreamReader..::..Dispose is called.

Show: