Skip to content

Commit 8edf14d

Browse files
authored
Samples fixes for Batch 13 of .NET Interactive changes (#4457)
* Samples fixes * undo some changes
1 parent 24edf30 commit 8edf14d

File tree

19 files changed

+55
-53
lines changed

19 files changed

+55
-53
lines changed

samples/snippets/cpp/VS_Snippets_CLR_System/system.Attribute.TypeId/CPP/typeid.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ int main()
116116

117117
/*
118118
This example of the Attribute::TypeId property
119-
generates the following output.
119+
generates output similar to the following:
120120
121121
Create instances from a derived Attribute class that implements TypeId,
122122
and then display the attributes and corresponding TypeId values:

samples/snippets/cpp/VS_Snippets_CLR_System/system.BitConverter.ToXXX.Others/CPP/batochar.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ int main()
3636
}
3737

3838
/*
39-
This example of the BitConverter::ToChar( unsigned char[ ], int )
39+
This example of the BitConverter::ToChar(unsigned char[ ], int)
4040
method generates the following output. It converts elements of a
4141
byte array to __wchar_t values.
4242
@@ -51,9 +51,9 @@ index array elements __wchar_t
5151
3 2A-00 *
5252
5 41-00 A
5353
7 7D-00 }
54-
9 C5-00 Å
55-
11 A8-03 ?
56-
13 29-04 ?
57-
15 AC-20 ?
54+
9 C5-00 Å
55+
11 A8-03 Ψ
56+
13 29-04 Щ
57+
15 AC-20
5858
*/
5959
//</Snippet2>

samples/snippets/cpp/VS_Snippets_CLR_System/system.Globalization.DateTimeFormatInfo.LongDatePattern/CPP/dtfi_longdatepattern.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@ int main()
2121
}
2222

2323
/*
24-
This code produces the following output. The question marks take the place of native script characters.
24+
This code produces the following output:
2525
2626
CULTURE PROPERTY VALUE
2727
en-US dddd, MMMM dd, yyyy
28-
ja-JP yyyy'?'M'?'d'?'
28+
ja-JP yyyy''M''d''
2929
fr-FR dddd d MMMM yyyy
3030
3131
*/

samples/snippets/csharp/VS_Snippets_CLR/RNGCSP/CS/rngcsp.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ public static void Main()
2727
Console.WriteLine("{0}: {1} ({2:p1})", i + 1, results[i], (double)results[i] / (double)totalRolls);
2828
}
2929
rngCsp.Dispose();
30-
Console.ReadLine();
3130
}
3231

3332
// This method simulates a roll of the dice. The input parameter is the

samples/snippets/csharp/VS_Snippets_CLR/StringInfo/CS/StringInfo.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,12 +58,12 @@ static void EnumTextElementIndexes(String s) {
5858
}
5959
}
6060

61-
// This code produces the following output.
61+
// This code produces the following output:
6262
//
6363
// Result of GetTextElementEnumerator:
64-
// Character at index 0 is 'a-"'
64+
// Character at index 0 is 'ā̈'
6565
// Character at index 3 is 'b'
66-
// Character at index 4 is 'c,'
66+
// Character at index 4 is ''
6767
//
6868
// Result of ParseCombiningCharacters:
6969
// Character 0 starts at index 0

samples/snippets/csharp/VS_Snippets_CLR_System/system.Attribute.TypeId/CS/typeid.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ static void Main( )
118118

119119
/*
120120
This example of the Attribute.TypeId property
121-
generates the following output.
121+
generates output similar to the following:
122122
123123
Create instances from a derived Attribute class that implements TypeId,
124124
and then display the attributes and corresponding TypeId values:

samples/snippets/csharp/VS_Snippets_CLR_System/system.BitConverter.ToXXX.Others/CS/batochar.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ public static void Main( )
4646
}
4747

4848
/*
49-
This example of the BitConverter.ToChar( byte[ ], int )
49+
This example of the BitConverter.ToChar(byte[ ], int)
5050
method generates the following output. It converts
5151
elements of a byte array to char values.
5252
@@ -62,8 +62,8 @@ 3 2A-00 *
6262
5 41-00 A
6363
7 7D-00 }
6464
9 C5-00 Å
65-
11 A8-03 ?
66-
13 29-04 ?
67-
15 AC-20 ?
65+
11 A8-03 Ψ
66+
13 29-04 Щ
67+
15 AC-20
6868
*/
6969
//</Snippet2>

samples/snippets/csharp/VS_Snippets_CLR_System/system.Globalization.DateTimeFormatInfo.LongDatePattern/CS/dtfi_longdatepattern.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,11 @@ public static void PrintPattern( String myCulture ) {
2323
}
2424

2525
/*
26-
This code produces the following output. The question marks take the place of native script characters.
26+
This code produces the following output:
2727
2828
CULTURE PROPERTY VALUE
2929
en-US dddd, MMMM d, yyyy
30-
ja-JP yyyy'?'M'?'d'?'
30+
ja-JP yyyy''M''d''
3131
fr-FR dddd d MMMM yyyy
3232
3333
*/

samples/snippets/csharp/VS_Snippets_CLR_System/system.Globalization.DateTimeFormatInfo.LongDatePattern/CS/longdatepattern1.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ public class Example
66
{
77
public static void Main()
88
{
9-
DateTime date1 = new DateTime(2001, 11, 12);
9+
DateTime date1 = new DateTime(2011, 11, 12);
1010
string[] cultureNames = { "en-US", "fr-FR", "ru-RU", "de-DE" };
1111
Console.WriteLine("{0,-7} {1,-20} {2:D}\n", "Culture", "Long Date Pattern", "Date");
1212
foreach (var cultureName in cultureNames) {
@@ -20,7 +20,8 @@ public static void Main()
2020
}
2121
// The example displays the following output:
2222
// Culture Long Date Pattern Date
23-
// en-US dddd, MMMM d, yyyy Saturday, November 12, 2011
23+
//
24+
// en-US dddd, MMMM d, yyyy Saturday, November 12, 2011
2425
// fr-FR dddd d MMMM yyyy samedi 12 novembre 2011
2526
// ru-RU d MMMM yyyy 'г.' 12 ноября 2011 г.
2627
// de-DE dddd, d. MMMM yyyy Samstag, 12. November 2011

samples/snippets/csharp/VS_Snippets_CLR_System/system.Globalization.DateTimeFormatInfo.LongDatePattern/CS/longdatepattern2.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ private static string GetCalendarName(Calendar cal)
3838
//
3939
// Gregorian-Localized dd MMMM, yyyy 07 آب, 2011
4040
// UmAlQura dd/MMMM/yyyy 07/رمضان/1432
41-
// Hijri dd/MM/yyyy 08/09/1432
41+
// Hijri dd MMMM, yyyy 08 رمضان, 1432
4242
// Gregorian-USEnglish dddd, MMMM dd, yyyy Sunday, August 07, 2011
4343
// Gregorian-MiddleEastFrench dddd, MMMM dd, yyyy dimanche, août 07, 2011
4444
// Gregorian-TransliteratedEnglish dddd, MMMM dd, yyyy الأحد, أغسطس 07, 2011

0 commit comments

Comments
 (0)