You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: System.IO.Streams/StreamReader.cs
+13-15Lines changed: 13 additions & 15 deletions
Original file line number
Diff line number
Diff line change
@@ -17,8 +17,6 @@ public class StreamReader : TextReader
17
17
privateconstintc_MaxReadLineLen=0xFFFF;
18
18
privateconstintc_BufferSize=512;
19
19
20
-
privateStream_stream;
21
-
22
20
// Initialized in constructor by CurrentEncoding scheme.
23
21
// Encoding can be changed by resetting this variable.
24
22
readonlyDecoder_decoder;
@@ -42,7 +40,7 @@ public class StreamReader : TextReader
42
40
/// <remarks>
43
41
/// You use this property to access the underlying stream. The StreamReader class buffers input from the underlying stream when you call one of the Read methods. If you manipulate the position of the underlying stream after reading data into the buffer, the position of the underlying stream might not match the position of the internal buffer. To reset the internal buffer, call the DiscardBufferedData method; however, this method slows performance and should be called only when absolutely necessary. The StreamReader constructors that have the detectEncodingFromByteOrderMarks parameter can change the encoding the first time you read from the StreamReader object.
44
42
/// </remarks>
45
-
publicvirtualStreamBaseStream=>_stream;
43
+
publicvirtualStreamBaseStream{get;privateset;}
46
44
47
45
/// <summary>
48
46
/// Gets the current character encoding that the current <see cref="StreamReader"/> object is using.
@@ -84,7 +82,7 @@ public StreamReader(Stream stream)
84
82
_buffer=newbyte[c_BufferSize];
85
83
_curBufPos=0;
86
84
_curBufLen=0;
87
-
_stream=stream;
85
+
BaseStream=stream;
88
86
_decoder=CurrentEncoding.GetDecoder();
89
87
_disposed=false;
90
88
}
@@ -112,14 +110,14 @@ public override void Close()
0 commit comments