StreamReader Constructor (Stream)
.NET Framework 4.6 and 4.5
Initializes a new instance of the
class for the specified stream. StreamReader
stream:Stream -> StreamReader
This constructor initializes the encoding to
, the UTF8Encoding property using the BaseStream stream parameter, and the internal buffer size to 1024 bytes.
object calls StreamReader on the provided Dispose () object when Stream is called. StreamReader .Dispose
When you compile a set of characters with a particular cultural setting and retrieve those same characters with a different cultural setting, the characters might not be interpretable, and could cause an exception to be thrown.
For a list of common I/O tasks, see
. Common I/O Tasks
The following code example demonstrates this
No code example is currently available or this language may not be supported.
Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0, 1.1
.NET Framework Client Profile
Supported in: 4, 3.5 SP1
Supported in: 3.0, 2.0, 1.0
.NET for Windows Phone apps
Supported in: Windows Phone 8.1, Windows Phone Silverlight 8.1, Windows Phone Silverlight 8
Portable Class Library
Supported in: Portable Class Library