Skip to content

Commit a8361e2

Browse files
TashasEvBillWagner
authored andcommitted
Clarify sort example per issue dotnet#1875 (dotnet#801)
I added an additional "Jody" per issue dotnet/dotnet-api-docs#1875 to demonstrate how the sorting function handles duplicate values, and updated the sample unsorted and sorted output to demonstrate how the duplication is handled.
1 parent 6d8b7ae commit a8361e2

File tree

1 file changed

+3
-3
lines changed
  • snippets/csharp/VS_Snippets_CLR_System/system.collections.generic.list.sort/cs

1 file changed

+3
-3
lines changed

snippets/csharp/VS_Snippets_CLR_System/system.collections.generic.list.sort/cs/Sort1.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ public class Example
66
{
77
public static void Main()
88
{
9-
String[] names = { "Samuel", "Dakota", "Koani", "Saya", "Vanya",
9+
String[] names = { "Samuel", "Dakota", "Koani", "Saya", "Vanya", "Jody",
1010
"Yiska", "Yuma", "Jody", "Nikita" };
1111
var nameList = new List<String>();
1212
nameList.AddRange(names);
@@ -26,9 +26,9 @@ public static void Main()
2626
}
2727
// The example displays the following output:
2828
// List in unsorted order:
29-
// Samuel Dakota Koani Saya Vanya Yiska Yuma Jody Nikita
29+
// Samuel Dakota Koani Saya Vanya Jody Yiska Yuma Jody Nikita
3030
//
3131
// List in sorted order:
32-
// Dakota Jody Koani Nikita Samuel Saya Vanya Yiska Yuma
32+
// Dakota Jody Jody Koani Nikita Samuel Saya Vanya Yiska Yuma
3333
// </Snippet2>
3434

0 commit comments

Comments
 (0)