Skip to content

Commit 35abe35

Browse files
authored
Fix build warnings in CompareOptions (#11164)
1 parent a33cd57 commit 35abe35

File tree

1 file changed

+22
-27
lines changed

1 file changed

+22
-27
lines changed

Diff for: xml/System.Globalization/CompareOptions.xml

+22-27
Original file line numberDiff line numberDiff line change
@@ -75,38 +75,33 @@
7575
Defines the string comparison options to use with <see cref="T:System.Globalization.CompareInfo" />.
7676
</summary>
7777
<remarks>
78-
<format type="text/markdown">
79-
<![CDATA[
80-
In .NET 5 and later, the cross-platform ICU (International Components for Unicode) library is used for string processing. The ICU library brings the following changes to string comparison behavior:
78+
<format type="text/markdown"><![CDATA[
8179
82-
- The default option `None` is now equivalent to the `StringSort` option. The previous functionality of `None`, where equal weighting was given to alphanumeric and nonalphanumeric characters, is no longer available.
83-
- Ligatures (combined characters like "æ" and "œ") are now seen as distinct from their expanded forms ("ae", "oe") in string comparisons by default. To treat ligatures and their expanded forms as equivalent, use the `IgnoreNonSpace` option.
80+
In .NET 5 and later, the cross-platform ICU (International Components for Unicode) library is used for string processing. The ICU library brings the following changes to string comparison behavior:
8481
85-
For more information about the change, including how to restore the previous Unicode handler, see [.NET globalization and ICU](/dotnet/core/extensions/globalization-icu).
82+
- The default option `None` is now equivalent to the `StringSort` option. The previous functionality of `None`, where equal weighting was given to alphanumeric and nonalphanumeric characters, is no longer available.
83+
- Ligatures (combined characters like "æ" and "œ") are now seen as distinct from their expanded forms ("ae", "oe") in string comparisons by default. To treat ligatures and their expanded forms as equivalent, use the `IgnoreNonSpace` option.
84+
85+
For more information about the change, including how to restore the previous Unicode handler, see [.NET globalization and ICU](/dotnet/core/extensions/globalization-icu).
86+
87+
For more information about this API, see [Supplemental API remarks for CompareOptions](/dotnet/fundamentals/runtime-libraries/system-globalization-compareoptions).
88+
89+
## Examples
90+
91+
The following code example shows how each of the CompareOptions values affect string comparisons.
92+
93+
:::code language="csharp" source="~/snippets/csharp/System.Globalization/CompareOptions/Overview/compareoptions_values.cs" interactive="try-dotnet":::
94+
:::code language="fsharp" source="~/snippets/fsharp/System.Globalization/compareoptions_values.fs":::
95+
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.Globalization.CompareOptions.Values/VB/compareoptions_values.vb":::
96+
97+
The following code example shows how sorting with StringSort differs from sorting without StringSort.
98+
99+
:::code language="csharp" source="~/snippets/csharp/System.Globalization/CompareOptions/Overview/compareoptions_stringsort.cs" interactive="try-dotnet":::
100+
:::code language="fsharp" source="~/snippets/fsharp/System.Globalization/compareoptions_stringsort.fs":::
101+
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.Globalization.CompareOptions.StringSort/VB/compareoptions_stringsort.vb":::
86102
87-
For more information about this API, see [Supplemental API remarks for CompareOptions](/dotnet/fundamentals/runtime-libraries/system-globalization-compareoptions).
88103
]]></format>
89104
</remarks>
90-
<example>
91-
The following code example shows how each of the CompareOptions values affect string comparisons.
92-
<format type="text/markdown">
93-
<![CDATA[
94-
:::code language="csharp" source="~/snippets/csharp/System.Globalization/CompareOptions/Overview/compareoptions_values.cs" interactive="try-dotnet":::
95-
:::code language="fsharp" source="~/snippets/fsharp/System.Globalization/compareoptions_values.fs":::
96-
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.Globalization.CompareOptions.Values/VB/compareoptions_values.vb" id="Snippet1":::
97-
]]>
98-
</format>
99-
</example>
100-
<example>
101-
The following code example shows how sorting with StringSort differs from sorting without StringSort.
102-
<format type="text/markdown">
103-
<![CDATA[
104-
:::code language="csharp" source="~/snippets/csharp/System.Globalization/CompareOptions/Overview/compareoptions_stringsort.cs" interactive="try-dotnet":::
105-
:::code language="fsharp" source="~/snippets/fsharp/System.Globalization/compareoptions_stringsort.fs":::
106-
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.Globalization.CompareOptions.StringSort/VB/compareoptions_stringsort.vb" id="Snippet2":::
107-
]]>
108-
</format>
109-
</example>
110105
<related type="Article" href="/dotnet/standard/base-types/basic-string-operations">Basic String Operations in .NET</related>
111106
</Docs>
112107
<Members>

0 commit comments

Comments
 (0)