Skip to content

Commit cf58517

Browse files
stephentoubRon Petrusha
authored andcommitted
Clarify Console.Out language slightly (dotnet#2743)
In particular, Console.Out likely doesn't return the exact object passed to SetOut, but instead another text writer that wraps it, e.g. to provide thread-safety.
1 parent 369b41d commit cf58517

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

xml/System/Console.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2883,8 +2883,8 @@
28832883
<Parameter Name="newOut" Type="System.IO.TextWriter" />
28842884
</Parameters>
28852885
<Docs>
2886-
<param name="newOut">A stream that is the new standard output.</param>
2887-
<summary>Sets the <see cref="P:System.Console.Out" /> property to the specified <see cref="T:System.IO.TextWriter" /> object.</summary>
2886+
<param name="newOut">A text writer to be used as the new standard output.</param>
2887+
<summary>Sets the <see cref="P:System.Console.Out" /> property to target the <see cref="T:System.IO.TextWriter" /> object.</summary>
28882888
<remarks>
28892889
<format type="text/markdown"><![CDATA[
28902890
@@ -2897,7 +2897,7 @@
28972897
[!code-csharp[System.Console.SetOut#1](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.console.setout/cs/source.cs#1)]
28982898
[!code-vb[System.Console.SetOut#1](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.console.setout/vb/source.vb#1)]
28992899
2900-
2900+
The actual object returned by <xref:System.Console.Out%2A> may be a synchronized wrapper around the provided text writer.
29012901
29022902
## Examples
29032903
The following example illustrates the use of the <xref:System.Console.SetOut%2A> method. It replaces four consecutive space characters in a string with a tab character. To run it, you must supply two command line arguments. The first is the name of an existing text file to redirect the standard input stream to. The second is the name of a file to redirect the standard output stream to. This file need not exist. If it does, its contents will be overwritten.
@@ -6030,4 +6030,4 @@
60306030
</Docs>
60316031
</Member>
60326032
</Members>
6033-
</Type>
6033+
</Type>

0 commit comments

Comments
 (0)