Skip to content

Commit 272c1d3

Browse files
WilliamAntonRohmmairaw
authored andcommitted
Console.WriteLine -- updating for Try .NET (#3347)
* updating for Try .NET * updating for Try .NET * addressing last review comment
1 parent b98e9fc commit 272c1d3

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

xml/System/Console.xml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4726,6 +4726,8 @@
47264726
## Remarks
47274727
The default line terminator is a string whose value is a carriage return followed by a line feed ("\r\n" in C#, or `vbCrLf` in Visual Basic). You can change the line terminator by setting the <xref:System.IO.TextWriter.NewLine%2A?displayProperty=nameWithType> property of the <xref:System.Console.Out%2A> property to another string.
47284728
4729+
[!INCLUDE[interactive-note](~/includes/csharp-interactive-note-some.md)]
4730+
47294731
]]></format>
47304732
</remarks>
47314733
</Docs>
@@ -4774,7 +4776,7 @@
47744776
The example changes the line terminator from its default value of "\r\n" or `vbCrLf` to "\r\n\r\n" or `vbCrLf` + `vbCrLf`. It then calls the <xref:System.Console.WriteLine> and <xref:System.Console.WriteLine%28System.String%29> methods to display output to the console.
47754777
47764778
[!code-cpp[System.Console.WriteLine#2](~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Console.WriteLine/CPP/newline1.cpp#2)]
4777-
[!code-csharp[System.Console.WriteLine#2](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Console.WriteLine/CS/newline1.cs#2)]
4779+
[!code-csharp-interactive[System.Console.WriteLine#2](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Console.WriteLine/CS/newline1.cs#2)]
47784780
[!code-vb[System.Console.WriteLine#2](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Console.WriteLine/VB/newline1.vb#2)]
47794781
47804782
]]></format>
@@ -4837,7 +4839,7 @@
48374839
The following example generates ten random integers and uses the <xref:System.Console.WriteLine%28System.Boolean%29?displayProperty=nameWithType> method to indicate whether they are even.
48384840
48394841
[!code-cpp[System.Console.WriteLine#4](~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Console.WriteLine/CPP/writeline_boolean1.cpp#4)]
4840-
[!code-csharp[System.Console.WriteLine#4](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Console.WriteLine/CS/writeline_boolean1.cs#4)]
4842+
[!code-csharp-interactive[System.Console.WriteLine#4](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Console.WriteLine/CS/writeline_boolean1.cs#4)]
48414843
[!code-vb[System.Console.WriteLine#4](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Console.WriteLine/VB/writeline_boolean1.vb#4)]
48424844
48434845
]]></format>
@@ -5246,7 +5248,7 @@
52465248
The following example uses the <xref:System.Console.WriteLine%28System.Object%29> method to display each value in an object array to the console.
52475249
52485250
[!code-cpp[System.Console.WriteLine#3](~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Console.WriteLine/CPP/writeline_obj1.cpp#3)]
5249-
[!code-csharp[System.Console.WriteLine#3](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Console.WriteLine/CS/writeline_obj1.cs#3)]
5251+
[!code-csharp-interactive[System.Console.WriteLine#3](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Console.WriteLine/CS/writeline_obj1.cs#3)]
52505252
[!code-vb[System.Console.WriteLine#3](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Console.WriteLine/VB/writeline_obj1.vb#3)]
52515253
52525254
]]></format>
@@ -5367,7 +5369,7 @@
53675369
The example changes the line terminator from its default value of "\r\n" or `vbCrLf` to "\r\n\r\n" or `vbCrLf` + `vbCrLf`. It then calls the <xref:System.Console.WriteLine> and <xref:System.Console.WriteLine%28System.String%29> methods to display output to the console.
53685370
53695371
[!code-cpp[System.Console.WriteLine#2](~/samples/snippets/cpp/VS_Snippets_CLR_System/system.Console.WriteLine/CPP/newline1.cpp#2)]
5370-
[!code-csharp[System.Console.WriteLine#2](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Console.WriteLine/CS/newline1.cs#2)]
5372+
[!code-csharp-interactive[System.Console.WriteLine#2](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Console.WriteLine/CS/newline1.cs#2)]
53715373
[!code-vb[System.Console.WriteLine#2](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Console.WriteLine/VB/newline1.vb#2)]
53725374
53735375
]]></format>
@@ -5575,7 +5577,7 @@
55755577
## Examples
55765578
The following example calls the <xref:System.Console.WriteLine%28System.String%2CSystem.Object%29> method to display five randomly generated <xref:System.Boolean> values.
55775579
5578-
[!code-csharp[System.Console.WriteLine#6](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Console.WriteLine/CS/WriteLine6.cs#6)]
5580+
[!code-csharp-interactive[System.Console.WriteLine#6](~/samples/snippets/csharp/VS_Snippets_CLR_System/system.Console.WriteLine/CS/WriteLine6.cs#6)]
55795581
[!code-vb[System.Console.WriteLine#6](~/samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Console.WriteLine/VB/WriteLine6.vb#6)]
55805582
55815583
The following example calls the <xref:System.Console.WriteLine%28System.String%2CSystem.Object%29> method to display the current date. Note that the format item in the `format` argument uses the "D" [standard date and time format string](~/docs/standard/base-types/standard-date-and-time-format-strings.md) to display the date in the long date format of the current culture.

0 commit comments

Comments
 (0)