Skip to content

Commit a75c501

Browse files
authored
Batch 18 - Sample fixes for .NET Interactive (dotnet#4664)
1 parent 58b59c6 commit a75c501

File tree

6 files changed

+4
-10
lines changed
  • samples/snippets
    • cpp
      • VS_Snippets_CLR_System/system.Text.Encoding.ASCII Example/CPP
      • VS_Snippets_CLR/sys.txt.fallbackEncRpl/cpp
    • csharp
      • VS_Snippets_CLR_System/system.Text.Encoding.ASCII Example/CS
      • VS_Snippets_CLR/sys.txt.fallbackEncRpl/cs
    • visualbasic
      • VS_Snippets_CLR_System/system.Text.Encoding.ASCII Example/VB
      • VS_Snippets_CLR/sys.txt.fallbackEncRpl/vb

6 files changed

+4
-10
lines changed

samples/snippets/cpp/VS_Snippets_CLR/sys.txt.fallbackEncRpl/cpp/fallEncRpl.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,7 @@ int main()
3333
int numberOfEncodedBytes = 0;
3434

3535
// ---------------------------------------------------------------------
36-
Console::Clear();
37-
38-
// Display the name of the encoding.
36+
// Display the name of the encoding.
3937
Console::WriteLine("The name of the encoding is \"{0}\".{1}",
4038
ascii->WebName, Environment::NewLine);
4139

samples/snippets/cpp/VS_Snippets_CLR_System/system.Text.Encoding.ASCII Example/CPP/ascii.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ int main()
4949
This code produces the following output.
5050
5151
Original string:
52-
This unicode string contains two characters with codes outside the ASCII code range, Pi (ã) and Sigma (ä).
52+
This unicode string contains two characters with codes outside the ASCII code range, Pi (Π) and Sigma (Σ).
5353
5454
Encoded bytes:
5555
[84][104][105][115][32][117][110][105][99][111][100][101][32][115][116][114][105][110][103][32][99][111][110][116][97][105][110][115][32][116][119][111][32][99][104][97][114][97][99][116][101][114][115][32][119][105][116][104][32][99][111][100][101][115][32][111][117][116][115][105][100][101][32][116][104][101][32][65][83][67][73][73][32][99][111][100][101][32][114][97][110][103][101][44][32][80][105][32][40][63][41][32][97][110][100][32][83][105][103][109][97][32][40][63][41][46]

samples/snippets/csharp/VS_Snippets_CLR/sys.txt.fallbackEncRpl/cs/fallEncRpl.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,6 @@ public static void Main()
3636
int ix = 0;
3737

3838
// --------------------------------------------------------------------------
39-
Console.Clear();
40-
4139
// Display the name of the encoding.
4240
Console.WriteLine("The name of the encoding is \"{0}\".\n", ae.WebName);
4341

samples/snippets/csharp/VS_Snippets_CLR_System/system.Text.Encoding.ASCII Example/CS/ascii.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public static void Main()
5555
This code produces the following output.
5656
5757
Original string:
58-
This unicode string contains two characters with codes outside the ASCII code range, Pi (ã) and Sigma (ä).
58+
This unicode string contains two characters with codes outside the ASCII code range, Pi (Π) and Sigma (Σ).
5959
6060
Encoded bytes:
6161
[84][104][105][115][32][117][110][105][99][111][100][101][32][115][116][114][105][110][103][32][99][111][110][116][97][105][110][115][32][116][119][111][32][99][104][97][114][97][99][116][101][114][115][32][119][105][116][104][32][99][111][100][101][115][32][111][117][116][115][105][100][101][32][116][104][101][32][65][83][67][73][73][32][99][111][100][101][32][114][97][110][103][101][44][32][80][105][32][40][63][41][32][97][110][100][32][83][105][103][109][97][32][40][63][41][46]

samples/snippets/visualbasic/VS_Snippets_CLR/sys.txt.fallbackEncRpl/vb/fallEncRpl.vb

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,6 @@ Class Sample
3232
Dim encodedBytes(numberOfEncodedBytes - 1) As Byte
3333

3434
' --------------------------------------------------------------------------
35-
Console.Clear()
36-
3735
' Display the name of the encoding.
3836
Console.WriteLine("The name of the encoding is ""{0}""." & vbCrLf, ae.WebName)
3937

samples/snippets/visualbasic/VS_Snippets_CLR_System/system.Text.Encoding.ASCII Example/VB/ascii.vb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ Class EncodingExample
4040
End Class
4141
'This code produces the following output.
4242
'Original string:
43-
'This unicode string contains two characters with codes outside 'the ASCII code range, Pi (ã) and Sigma (ä).
43+
'This unicode string contains two characters with codes outside the ASCII code range, Pi (Π) and Sigma (Σ).
4444
'
4545
'Encoded bytes:
4646
'[84][104][105][115][32][117][110][105][99][111][100][101][32]'[115][116][114][105][110][103][32][99][111][110][116][97]'[105][110][115][32][116][119][111][32][99][104][97][114][97]'[99][116][101][114][115][32][119][105][116][104][32][99][111]'[100][101][115][32][111][117][116][115][105][100][101][32]'[116][104][101][32][65][83][67][73][73][32][99][111][100]'[101][32][114][97][110][103][101][44][32][80][105][32][40]'[63][41][32][97][110][100][32][83][105][103][109][97][32][40]'[63][41][46]

0 commit comments

Comments
 (0)