Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

System.Globalization.CompareOptions update #10087

Open
wants to merge 11 commits into
base: main
Choose a base branch
from

Conversation

daverayment
Copy link

@daverayment daverayment commented Jul 5, 2024

Summary

  • New remarks section describing the change in .NET 5 to use the ICU library, which changes the default sort order and affects the behaviour of comparing against ligature characters.
  • Rewrote descriptions for each of the options, simplifying language and improving consistency.
  • New code example which details how each of the CompareOptions enum values affect string comparisons, for all four supported languages.
  • Updated StringSort code example, which now uses more modern and consistent .NET conventions, and includes a note about changes brought about in .NET 5 (where StringSort and None are now equivalent by default).
  • Added StringSort F# example.

Additional Globalization documentation update in main dotnet/docs repo PR: 41661

Fixes #41052

StringSort example updated with note about changes in .NET 5 and later versions. Now uses more modern and idiomatic C# language features, and correct formatting.
New CompareOptions example showing each option.
F# example showing usage of each CompareOptions value.
Rewritten. Uses more modern language constructs. Includes note about differences between .NET 5+ and earlier versions.
Rewritten with more modern .NET language usage, and note about difference between .NET 5+ and prior versions with regard to sort order.
New C++ example showing the effect of each of the CompareOptions values.
New VB example showing the effect of each of the CompareOptions values.
…s/VB/compareoptions_values.vb

Remove misplaced file.
New VB example showing the effect of each of the CompareOptions values.
Updated descriptions for each of the options. New introduction, including notes about the StringSort and ligature character changes in .NET 5. Links added to updated and new example code for all supported languages.
@daverayment daverayment requested a review from a team as a code owner July 5, 2024 14:42
@daverayment
Copy link
Author

@dotnet-policy-service agree

Copy link

Learn Build status updates of commit a5e9fb8:

⚠️ Validation status: warnings

File Status Preview URL Details
xml/System.Globalization/CompareOptions.xml ⚠️Warning View Details
snippets/cpp/VS_Snippets_CLR_System/system.Globalization.CompareOptions.StringSort/CPP/compareoptions_stringsort.cpp ✅Succeeded View
snippets/cpp/VS_Snippets_CLR_System/system.Globalization.CompareOptions.Values/CPP/compareoptions_values.cpp ✅Succeeded View
snippets/csharp/System.Globalization/CompareOptions/Overview/compareoptions_stringsort.cs ✅Succeeded View
snippets/csharp/System.Globalization/CompareOptions/Overview/compareoptions_values.cs ✅Succeeded View
snippets/fsharp/System.Globalization/compareoptions_stringsort.fs ✅Succeeded View
snippets/fsharp/System.Globalization/compareoptions_values.fs ✅Succeeded View
snippets/visualbasic/VS_Snippets_CLR_System/system.Globalization.CompareOptions.StringSort/VB/compareoptions_stringsort.vb ✅Succeeded View
snippets/visualbasic/VS_Snippets_CLR_System/system.Globalization.CompareOptions.Values/VB/compareoptions_values.vb ✅Succeeded View

xml/System.Globalization/CompareOptions.xml

  • Line 0, Column 0: [Warning: invalid-code] It looks like your code snippet was not rendered. Try range instead.

For more details, please refer to the build report.

Note: Your PR may contain errors or warnings or suggestions unrelated to the files you changed. This happens when external dependencies like GitHub alias, Microsoft alias, cross repo links are updated. Please use these instructions to resolve them.

For any questions, please:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant