Skip to content

Commit 26dfea5

Browse files
authored
Improve sample and sample outputs (#4526)
1 parent 7fa27b6 commit 26dfea5

File tree

27 files changed

+37
-46
lines changed

27 files changed

+37
-46
lines changed

samples/snippets/cpp/VS_Snippets_CLR_System/system.Collections.Specialized.HybridDictionary2/CPP/hybriddictionary.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ void PrintKeysAndValues3( HybridDictionary^ myCol )
107107
}
108108

109109
/*
110-
This code produces the following output.
110+
This code produces output similar to the following:
111111
112112
Displays the elements using for each:
113113
KEY VALUE

samples/snippets/cpp/VS_Snippets_CLR_System/system.Collections.Specialized.HybridDictionary_AddRemove/CPP/hybriddictionary_addremove.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ int main()
6060
}
6161

6262
/*
63-
This code produces the following output.
63+
This code produces output similar to the following:
6464
6565
Initial contents of the HybridDictionary:
6666
KEY VALUE

samples/snippets/cpp/VS_Snippets_CLR_System/system.Collections.Specialized.HybridDictionary_Contains/CPP/hybriddictionary_contains.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ int main()
5858
}
5959

6060
/*
61-
This code produces the following output.
61+
This code produces output similar to the following:
6262
6363
Initial contents of the HybridDictionary:
6464
KEY VALUE

samples/snippets/cpp/VS_Snippets_CLR_System/system.Collections.Specialized.HybridDictionary_CopyTo/CPP/hybriddictionary_copyto.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ int main()
6161
}
6262

6363
/*
64-
This code produces the following output.
64+
This code produces output similar to the following:
6565
6666
Initial contents of the HybridDictionary:
6767
KEY VALUE

samples/snippets/cpp/VS_Snippets_CLR_System/system.Collections.Specialized.HybridDictionary_Enumerator/CPP/hybriddictionary_enumerator.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ void PrintKeysAndValues3( HybridDictionary^ myCol )
7878
}
7979

8080
/*
81-
This code produces the following output.
81+
This code produces output similar to the following:
8282
8383
Displays the elements using for each:
8484
KEY VALUE

samples/snippets/cpp/VS_Snippets_CLR_System/system.Collections.Specialized.ListDictionary_AddRemove/CPP/listdictionary_addremove.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ int main()
3737
PrintKeysAndValues( myCol );
3838

3939
// Deletes a key.
40-
myCol->Remove( "Plums" );
41-
Console::WriteLine( "The collection contains the following elements after removing \"Plums\":" );
40+
myCol->Remove( "Gala Apples" );
41+
Console::WriteLine( "The collection contains the following elements after removing \"Gala Apples\":" );
4242
PrintKeysAndValues( myCol );
4343

4444
// Clears the entire collection.
@@ -59,11 +59,10 @@ Initial contents of the ListDictionary:
5959
Granny Smith Apples 0.89
6060
Red Delicious Apples 0.99
6161
62-
The collection contains the following elements after removing "Plums":
62+
The collection contains the following elements after removing "Gala Apples":
6363
KEY VALUE
6464
Braeburn Apples 1.49
6565
Fuji Apples 1.29
66-
Gala Apples 1.49
6766
Golden Delicious Apples 1.29
6867
Granny Smith Apples 0.89
6968
Red Delicious Apples 0.99

samples/snippets/cpp/VS_Snippets_CLR_System/system.Collections.Specialized.OrderedDictionary1/cpp/ordereddictionary1.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,6 @@ public ref class OrderedDictionarySample
6969

7070
DisplayEnumerator(myEnumerator);
7171
//</Snippet03>
72-
73-
Console::ReadLine();
7472
}
7573

7674
//<Snippet04>

samples/snippets/cpp/VS_Snippets_CLR_System/system.Text.Encoding.GetChars/CPP/getchars.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
1+
22
// The following code example encodes a string into an array of bytes,
33
// and then decodes the bytes into an array of characters.
44
// <Snippet1>
@@ -57,8 +57,8 @@ void PrintCountsAndChars( array<Byte>^bytes, Encoding^ enc )
5757
/*
5858
This code produces the following output. The question marks take the place of characters that cannot be displayed at the console.
5959
60-
BE array with BE encoding : System.Text.UTF32Encoding : 5 12 :za??ß
61-
LE array with LE encoding : System.Text.UTF32Encoding : 5 12 :za??ß
60+
BE array with BE encoding : System.Text.UTF32Encoding : 5 12 :zăǽβ
61+
LE array with LE encoding : System.Text.UTF32Encoding : 5 12 :zăǽβ
6262
6363
*/
6464
// </Snippet1>

samples/snippets/cpp/VS_Snippets_Remoting/NCLUriEnhancements/CPP/nclurienhancements.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,9 @@ void SampleOriginalString()
6666
Uri^ uriAddress = gcnew Uri( "HTTP://www.ConToso.com:80//thick%20and%20thin.htm" );
6767

6868
// Write the new Uri to the console and note the difference in the two values.
69-
// ToString() gives the canonical version. OriginalString gives the orginal
69+
// ToString() gives the canonical version. OriginalString gives the original
7070
// string that was passed to the constructor.
71-
// The following outputs "http://www.contoso.com/thick and thin.htm".
71+
// The following outputs "http://www.contoso.com//thick and thin.htm".
7272
Console::WriteLine( uriAddress );
7373

7474
// The following outputs "HTTP://www.ConToso.com:80//thick%20and%20thin.htm".

samples/snippets/csharp/VS_Snippets_CLR_System/system.Collections.Specialized.HybridDictionary2/CS/hybriddictionary.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ public static void PrintKeysAndValues3( HybridDictionary myCol ) {
103103
}
104104

105105
/*
106-
This code produces the following output.
106+
This code produces output similar to the following:
107107
108108
Displays the elements using foreach:
109109
KEY VALUE

0 commit comments

Comments
 (0)