Skip to content

Commit 41f5560

Browse files
authored
Clarify bufferSize parameter description in XML
1 parent 3d79db6 commit 41f5560

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

xml/System.IO/StreamReader.xml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -974,13 +974,13 @@
974974
<param name="stream">The stream to be read.</param>
975975
<param name="encoding">The character encoding to use.</param>
976976
<param name="detectEncodingFromByteOrderMarks">Indicates whether to look for byte order marks at the beginning of the file.</param>
977-
<param name="bufferSize">The minimum buffer size.</param>
977+
<param name="bufferSize">The minimum buffer size in bytes.</param>
978978
<summary>Initializes a new instance of the <see cref="T:System.IO.StreamReader" /> class for the specified stream, with the specified character encoding, byte order mark detection option, and buffer size.</summary>
979979
<remarks>
980980
<format type="text/markdown"><![CDATA[
981981
982982
## Remarks
983-
The buffer size, in number of 16-bit characters, is set by the `bufferSize` parameter. If `bufferSize` is less than the minimum allowable size (128 characters), the minimum allowable size is used.
983+
The buffer size, in bytes, is set by the `bufferSize` parameter. If `bufferSize` is less than the minimum allowable size (128 bytes), the minimum allowable size is used.
984984
985985
This constructor allows you to change the encoding the first time you read from the <xref:System.IO.StreamReader> object. The `detectEncodingFromByteOrderMarks` parameter detects the encoding by looking at the first four bytes of the stream. It automatically recognizes UTF-8, little-endian UTF-16, big-endian UTF-16, little-endian UTF-32, and big-endian UTF-32 text if the file starts with the appropriate byte order marks. Otherwise, the user-provided encoding is used. See the <xref:System.Text.Encoding.GetPreamble%2A?displayProperty=nameWithType> method for more information.
986986
@@ -1077,7 +1077,7 @@
10771077
<param name="path">The complete file path to be read.</param>
10781078
<param name="encoding">The character encoding to use.</param>
10791079
<param name="detectEncodingFromByteOrderMarks">Indicates whether to look for byte order marks at the beginning of the file.</param>
1080-
<param name="bufferSize">The minimum buffer size, in number of 16-bit characters.</param>
1080+
<param name="bufferSize">The minimum buffer size in bytes.</param>
10811081
<summary>Initializes a new instance of the <see cref="T:System.IO.StreamReader" /> class for the specified file name, with the specified character encoding, byte order mark detection option, and buffer size.</summary>
10821082
<remarks>
10831083
<format type="text/markdown"><![CDATA[
@@ -1087,7 +1087,7 @@
10871087
10881088
This constructor allows you to change the encoding the first time you read from the <xref:System.IO.StreamReader> object. The `detectEncodingFromByteOrderMarks` parameter detects the encoding by looking at the first four bytes of the stream. It automatically recognizes UTF-8, little-endian UTF-16, big-endian UTF-16, little-endian UTF-32, and big-endian UTF-32 text if the file starts with the appropriate byte order marks. Otherwise, the user-provided encoding is used. See the <xref:System.Text.Encoding.GetPreamble%2A?displayProperty=nameWithType> method for more information.
10891089
1090-
The buffer size, in number of 16-bit characters, is set by the `bufferSize` parameter. If `bufferSize` is less than the minimum allowable size (128 characters), the minimum allowable size is used.
1090+
The buffer size, in bytes, is set by the `bufferSize` parameter. If `bufferSize` is less than the minimum allowable size (128 bytes), the minimum allowable size is used.
10911091
10921092
The `path` parameter can be a file name, including a file on a Universal Naming Convention (UNC) share.
10931093
@@ -1249,7 +1249,7 @@
12491249
<param name="encoding">The character encoding to use.</param>
12501250
<param name="detectEncodingFromByteOrderMarks">
12511251
<see langword="true" /> to look for byte order marks at the beginning of the file; otherwise, <see langword="false" />.</param>
1252-
<param name="bufferSize">The minimum buffer size.</param>
1252+
<param name="bufferSize">The minimum buffer size in bytes.</param>
12531253
<param name="leaveOpen">
12541254
<see langword="true" /> to leave the stream open after the <see cref="T:System.IO.StreamReader" /> object is disposed; otherwise, <see langword="false" />.</param>
12551255
<summary>Initializes a new instance of the <see cref="T:System.IO.StreamReader" /> class for the specified stream based on the specified character encoding, byte order mark detection option, and buffer size, and optionally leaves the stream open.</summary>
@@ -1259,7 +1259,7 @@
12591259
## Remarks
12601260
Unless you set the `leaveOpen` parameter to `true`, the <xref:System.IO.StreamReader> object calls <xref:System.IO.Stream.Dispose> on the provided <xref:System.IO.Stream> object when <xref:System.IO.StreamReader.Dispose%2A?displayProperty=nameWithType> is called.
12611261
1262-
The buffer size, in number of 16-bit characters, is set by the `bufferSize` parameter. If `bufferSize` is less than the minimum allowable size (128 characters), the minimum allowable size is used.
1262+
The buffer size, in bytes, is set by the `bufferSize` parameter. If `bufferSize` is less than the minimum allowable size (128 bytes), the minimum allowable size is used.
12631263
12641264
This constructor enables you to change the encoding the first time you read from the <xref:System.IO.StreamReader> object. If the `detectEncodingFromByteOrderMarks` parameter is `true`, the constructor detects the encoding by looking at the first four bytes of the stream. It automatically recognizes UTF-8, little-endian UTF-16, big-endian UTF-16, little-endian UTF-32, and big-endian UTF-32 text if the file starts with the appropriate byte order marks. Otherwise, the user-provided encoding is used. See the <xref:System.Text.Encoding.GetPreamble%2A?displayProperty=nameWithType> method for more information.
12651265

0 commit comments

Comments
 (0)