Skip to content

Commit 336476c

Browse files
committed
Fixes in documentation comments
1 parent dce7be2 commit 336476c

File tree

5 files changed

+17
-14
lines changed

5 files changed

+17
-14
lines changed

System.IO.Streams/MemoryStream.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ public MemoryStream()
5454
/// Initializes a new non-resizable instance of the <see cref="MemoryStream"/> class based on the specified byte array.
5555
/// </summary>
5656
/// <param name="buffer">The array of unsigned bytes from which to create the current stream.</param>
57-
/// <exception cref="ArgumentNullException"><paramref name="buffer"/> is <see langword="null"/>./exception>
57+
/// <exception cref="ArgumentNullException"><paramref name="buffer"/> is <see langword="null"/>.</exception>
5858
/// <remarks>
5959
/// <para>
6060
/// The <see cref="CanRead"/>, <see cref="CanSeek"/>, and <see cref="CanWrite"/> properties are all set to <see langword="true"/>.

System.IO.Streams/StreamReader.cs

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,13 @@ public class StreamReader : TextReader
4747
/// <summary>
4848
/// Gets the current character encoding that the current <see cref="StreamReader"/> object is using.
4949
/// </summary>
50-
/// <value>The current character encoding used by the current reader. The value can be different after the first call to any <see cref="Read"/> method of <see cref="StreamReader"/>, since encoding autodetection is not done until the first call to a <see cref="Read"/> method.</value>
50+
/// <value>The current character encoding used by the current reader. The value can be different after the first call to any <see cref="Read()"/> method of <see cref="StreamReader"/>, since encoding autodetection is not done until the first call to a <see cref="Read()"/> method.</value>
5151
public virtual Encoding CurrentEncoding => System.Text.Encoding.UTF8;
5252

53+
/// <summary>
54+
/// Gets a value that indicates whether the current stream position is at the end of the stream.
55+
/// </summary>
56+
/// <value><see langword="true"/> if the current stream position is at the end of the stream; otherwise <see langword="false"/>.</value>
5357
public bool EndOfStream
5458
{
5559
get
@@ -198,13 +202,12 @@ public override int Peek()
198202
/// </summary>
199203
/// <returns>The next character from the input stream represented as an <see cref="int"/> object, or -1 if no more characters are available.</returns>
200204
/// <remarks>
201-
/// This method overrides <see cref="TextReader.Read"/>.
205+
/// This method overrides <see cref="TextReader.Read()"/>.
202206
/// This method returns an integer so that it can return -1 if the end of the stream has been reached. 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.
203207
/// </remarks>
204208
public override int Read()
205209
{
206210
int byteUsed, charUsed;
207-
bool completed = false;
208211

209212
while (true)
210213
{
@@ -270,7 +273,7 @@ public override int Read()
270273
/// This method overrides TextReader.Read.
271274
/// This method returns an integer so that it can return 0 if the end of the stream has been reached.
272275
/// When using the Read method, it is more efficient to use a buffer that is the same size as the internal buffer of the stream, where the internal buffer is set to your desired block size, and to always read less than the block size.If the size of the internal buffer was unspecified when the stream was constructed, its default size is 4 kilobytes(4096 bytes). 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.
273-
/// This method returns after either the number of characters specified by the count parameter are read, or the end of the file is reached. <see cref="ReadBlock"/> is a blocking version of <see cref="Read"/>.
276+
/// This method returns after either the number of characters specified by the count parameter are read, or the end of the file is reached. <see cref="TextReader.ReadBlock(char[], int, int)"/> is a blocking version of <see cref="Read(char[], int, int)"/>.
274277
/// </remarks>
275278
public override int Read(
276279
char[] buffer,

System.IO.Streams/StreamWriter.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ public override void Flush()
144144
/// </summary>
145145
/// <param name="value"></param>
146146
/// <remarks>
147-
/// This method overrides <see cref="TextWriter.Write"/>.
147+
/// This method overrides <see cref="TextWriter.Write(char)"/>.
148148
/// The specified character is written to the underlying stream unless the end of the stream is reached prematurely.
149149
/// </remarks>
150150
public override void Write(char value)
@@ -168,7 +168,7 @@ public override void WriteLine()
168168
/// Writes a string to the stream, followed by a line terminator.
169169
/// </summary>
170170
/// <remarks>
171-
/// This overload is equivalent to the <see cref="TextWriter.Write"/> overload.
171+
/// This overload is equivalent to the <see cref="TextWriter.Write(string)"/> overload.
172172
/// The line terminator is defined by the CoreNewLine field.
173173
/// This method does not search the specified string for individual newline characters(hexadecimal 0x000a) and replace them with NewLine.
174174
/// </remarks>

System.IO.Streams/TextReader.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ protected TextReader() { }
2727
/// Closes the <see cref="TextReader"/> and releases any system resources associated with the <see cref="TextReader"/>.
2828
/// </summary>
2929
/// <remarks>
30-
/// This implementation of <see cref="Close"/> calls the <see cref="TextReader.Dispose"/>(Boolean) method and passes it a true value.
30+
/// This implementation of <see cref="Close"/> calls the <see cref="TextReader.Dispose(bool)"/> method and passes it a true value.
3131
/// </remarks>
3232
public virtual void Close()
3333
{
@@ -48,8 +48,8 @@ public void Dispose()
4848
/// </summary>
4949
/// <param name="disposing"><see langword="true"/> to release both managed and unmanaged resources; false to release only unmanaged resources.</param>
5050
/// <remarks>
51-
/// This method is called by the public <see cref="Dispose"/> method and the Finalize method. By default, this method specifies the disposing parameter as <see langword="true"/>. Finalize specifies the disposing parameter as false.
52-
/// When the disposing parameter is true, this method releases all resources held by any managed objects that this TextReader references. This method invokes the <see cref="Dispose"/> method of each referenced object.
51+
/// This method is called by the public <see cref="Dispose()"/> method and the Finalize method. By default, this method specifies the disposing parameter as <see langword="true"/>. Finalize specifies the disposing parameter as false.
52+
/// When the disposing parameter is true, this method releases all resources held by any managed objects that this TextReader references. This method invokes the <see cref="Dispose()"/> method of each referenced object.
5353
/// </remarks>
5454
protected virtual void Dispose(bool disposing)
5555
{
@@ -98,7 +98,7 @@ public virtual int Read()
9898
/// This method returns after either count characters are read or the end of the file is reached. <see cref="ReadBlock"/> is a blocking version of this method.
9999
/// </para>
100100
/// <para>
101-
/// The <see cref="TextReader"/> class is an abstract class. Therefore, you do not instantiate it in your code.For an example of using the <see cref="Read"/> method, see the StreamReader.Read method.
101+
/// The <see cref="TextReader"/> class is an abstract class. Therefore, you do not instantiate it in your code.For an example of using the <see cref="Read(char[], int , int )"/> method, see the StreamReader.Read method.
102102
/// </para>
103103
/// </remarks>
104104
public virtual int Read(char[] buffer, int index, int count)
@@ -118,7 +118,7 @@ public virtual int Read(char[] buffer, int index, int count)
118118
/// The position of the underlying text reader is advanced by the number of characters that were read into buffer.
119119
/// </para>
120120
/// <para>
121-
/// The method blocks until either count characters are read, or all characters have been read.This is a blocking version of <see cref="Read"/>.
121+
/// The method blocks until either count characters are read, or all characters have been read.This is a blocking version of <see cref="Read(char[], int, int)"/>.
122122
/// </para>
123123
/// </remarks>
124124
public virtual int ReadBlock(char[] buffer, int index, int count)

System.IO.Streams/TextWriter.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ public virtual void Write(string value)
222222
}
223223

224224
/// <summary>
225-
/// Writes the text representation of an object to the text stream by calling the <see cref="ToString"/> method on that object.
225+
/// Writes the text representation of an object to the text stream by calling the <see cref="object.ToString"/> method on that object.
226226
/// </summary>
227227
/// <param name="value">The object to write.</param>
228228
public virtual void Write(object value)
@@ -359,7 +359,7 @@ public virtual void WriteLine(string value)
359359
}
360360

361361
/// <summary>
362-
/// Writes the text representation of an object to the text stream by calling the <see cref="ToString"/> method on that object, followed by a line terminator.
362+
/// Writes the text representation of an object to the text stream by calling the <see cref="object.ToString"/> method on that object, followed by a line terminator.
363363
/// </summary>
364364
/// <param name="value">The object to write.</param>
365365
public virtual void WriteLine(object value)

0 commit comments

Comments
 (0)