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)
Syntax
'Declaration
Public Sub New ( _
stream As Stream _
)
public StreamReader(
Stream stream
)
public:
StreamReader(
Stream^ stream
)
new :
stream:Stream -> StreamReader
public function StreamReader(
stream : Stream
)
Parameters
- stream
Type: System.IO. . :: . .Stream
The stream to be read.
Remarks
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.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see dd66cd4c-b087-415f-9c3e-94e3a1835f74.