Skip to content

Fix format tag warnings #11235

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

Merged
merged 2 commits into from
Apr 24, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 16 additions & 7 deletions xml/System.Globalization/CompareInfo.xml
Original file line number Diff line number Diff line change
Expand Up @@ -86,14 +86,23 @@
</Attributes>
<Docs>
<summary>Implements a set of methods for culture-sensitive string comparisons.</summary>
<remarks>For more information about this API, see <see href="/dotnet/fundamentals/runtime-libraries/system-globalization-compareinfo">Supplemental API remarks for CompareInfo</see>.</remarks>
<example>
The following example shows how the <see cref="T:System.Globalization.CompareInfo" /> object associated with a <see cref="T:System.Globalization.CultureInfo" /> object affects string comparison.
<remarks>
<format type="text/markdown"><![CDATA[
:::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR/CompareInfo/cpp/CompareInfo.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Globalization/CompareInfo/Overview/CompareInfo.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR/CompareInfo/VB/CompareInfo.vb" id="Snippet1":::
]]></format></example>

## Remarks

For more information about this API, see [Supplemental API remarks for CompareInfo](/dotnet/fundamentals/runtime-libraries/system-globalization-compareinfo).

## Example

The following example shows how the <xref:System.Globalization.CompareInfo> object associated with a <xref:System.Globalization.CultureInfo> object affects string comparison.

:::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR/CompareInfo/cpp/CompareInfo.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Globalization/CompareInfo/Overview/CompareInfo.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR/CompareInfo/VB/CompareInfo.vb" id="Snippet1":::

]]></format>
</remarks>
<related type="ExternalDocumentation" href="https://www.microsoft.com/download/details.aspx?id=10921">Sorting Weight Tables for Windows operating systems</related>
<related type="ExternalDocumentation" href="https://www.unicode.org/Public/UCA/latest/allkeys.txt">Default Unicode Collation Element Table, for Linux and macOS</related>
</Docs>
Expand Down
21 changes: 15 additions & 6 deletions xml/System.Globalization/CultureAndRegionInfoBuilder.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,22 @@
</Attributes>
<Docs>
<summary>Defines a custom culture that is new or based on another culture and country/region. The custom culture can be installed on a computer and subsequently used by any application that is running on that computer. This class cannot be inherited.</summary>
<remarks>For more information about this API, see <see href="/dotnet/fundamentals/runtime-libraries/system-globalization-cultureandregioninfobuilder">Supplemental API remarks for CultureAndRegionInfoBuilder</see>.</remarks>
<example>
The following example defines a custom ru-US culture that represents the Russian language in the United States. The example defines the custom culture by loading settings from the Russian (Russia) <see cref="T:System.Globalization.CultureInfo" /> object and the U.S. <see cref="T:System.Globalization.RegionInfo" /> object, and then sets a number of <see cref="T:System.Globalization.CultureAndRegionInfoBuilder" /> properties. The example registers the custom culture, and then instantiates it and makes it the current culture.
<remarks>
<format type="text/markdown"><![CDATA[
:::code language="csharp" source="~/snippets/csharp/System.Globalization/CultureAndRegionInfoBuilder/Overview/car.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.globalization.cultureandregioninfobuilder.class/vb/car.vb" id="Snippet1":::
]]></format></example>

## Remarks

For more information about this API, see [Supplemental API remarks for CultureAndRegionInfoBuilder](/dotnet/fundamentals/runtime-libraries/system-globalization-cultureandregioninfobuilder).

## Example

The following example defines a custom ru-US culture that represents the Russian language in the United States. The example defines the custom culture by loading settings from the Russian (Russia) <xref:System.Globalization.CultureInfo> object and the U.S. <xref:System.Globalization.RegionInfo> object, and then sets a number of <xref:System.Globalization.CultureAndRegionInfoBuilder> properties. The example registers the custom culture, and then instantiates it and makes it the current culture.

:::code language="csharp" source="~/snippets/csharp/System.Globalization/CultureAndRegionInfoBuilder/Overview/car.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.globalization.cultureandregioninfobuilder.class/vb/car.vb" id="Snippet1":::

]]></format>
</remarks>
</Docs>
<Members>
<Member MemberName=".ctor">
Expand Down
23 changes: 16 additions & 7 deletions xml/System.Globalization/CultureInfo.xml
Original file line number Diff line number Diff line change
Expand Up @@ -86,14 +86,23 @@
</Attributes>
<Docs>
<summary>Provides information about a specific culture (called a *locale* for unmanaged code development). The information includes the names for the culture, the writing system, the calendar used, the sort order of strings, and formatting for dates and numbers.</summary>
<remarks>For more information about this API, see <see href="/dotnet/fundamentals/runtime-libraries/system-globalization-cultureinfo">Supplemental API remarks for CultureInfo</see>.</remarks>
<example>
The following example shows how to create a <see cref="T:System.Globalization.CultureInfo" /> object for Spanish (Spain) with the international sort and another <see cref="T:System.Globalization.CultureInfo" /> object with the traditional sort.
<remarks>
<format type="text/markdown"><![CDATA[
:::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR_System/system.Globalization.CultureInfo_esES/CPP/spanishspain.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Globalization/CultureInfo/Overview/spanishspain.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.Globalization.CultureInfo_esES/VB/spanishspain.vb" id="Snippet1":::
]]></format></example>

## Remarks

For more information about this API, see [Supplemental API remarks for CultureInfo](/dotnet/fundamentals/runtime-libraries/system-globalization-cultureinfo).

## Example

The following example shows how to create a <xref:System.Globalization.CultureInfo> object for Spanish (Spain) with the international sort and another <xref:System.Globalization.CultureInfo> object with the traditional sort.

:::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR_System/system.Globalization.CultureInfo_esES/CPP/spanishspain.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Globalization/CultureInfo/Overview/spanishspain.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.Globalization.CultureInfo_esES/VB/spanishspain.vb" id="Snippet1":::

]]></format>
</remarks>
<altmember cref="T:System.Globalization.CultureAndRegionInfoBuilder" />
<altmember cref="T:System.Globalization.RegionInfo" />
</Docs>
Expand Down
23 changes: 16 additions & 7 deletions xml/System.Globalization/RegionInfo.xml
Original file line number Diff line number Diff line change
Expand Up @@ -73,14 +73,23 @@
</Attributes>
<Docs>
<summary>Contains information about the country/region.</summary>
<remarks>For more information about this API, see <see href="/dotnet/fundamentals/runtime-libraries/system-globalization-regioninfo">Supplemental API remarks for RegionInfo</see>.</remarks>
<example>
The following example demonstrates several members of the <see cref="T:System.Globalization.RegionInfo" /> class.
<remarks>
<format type="text/markdown"><![CDATA[
:::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR_System/system.Globalization.RegionInfo/CPP/regioninfo.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Globalization/RegionInfo/Overview/regioninfo.cs" interactive="try-dotnet" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.Globalization.RegionInfo/VB/regioninfo.vb" id="Snippet1":::
]]></format></example>

## Remarks

For more information about this API, see [Supplemental API remarks for RegionInfo](/dotnet/fundamentals/runtime-libraries/system-globalization-regioninfo).

## Example

The following example demonstrates several members of the <xref:System.Globalization.RegionInfo> class.

:::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR_System/system.Globalization.RegionInfo/CPP/regioninfo.cpp" id="Snippet1":::
:::code language="csharp" source="~/snippets/csharp/System.Globalization/RegionInfo/Overview/regioninfo.cs" interactive="try-dotnet" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.Globalization.RegionInfo/VB/regioninfo.vb" id="Snippet1":::

]]></format>
</remarks>
<altmember cref="T:System.Globalization.CultureInfo" />
</Docs>
<Members>
Expand Down
21 changes: 15 additions & 6 deletions xml/System.Globalization/SortVersion.xml
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,22 @@
</Attributes>
<Docs>
<summary>Provides information about the version of Unicode used to compare and order strings.</summary>
<remarks>For more information about this API, see <see href="/dotnet/fundamentals/runtime-libraries/system-globalization-sortversion">Supplemental API remarks for SortVersion</see>.</remarks>
<example>
The following example contains a portion of the source code from an application that uses the <see cref="T:System.Globalization.SortVersion" /> class to ensure that the native names of <see cref="T:System.Globalization.RegionInfo" /> objects are ordered appropriately for the current system and current culture. It uses the <see cref="T:System.IO.BinaryReader" /> and <see cref="T:System.IO.BinaryWriter" /> objects to store and retrieve ordered data from a data file named `Regions.dat` rather than retrieving and ordering data each time the application is run. The example first checks to determine whether the data file exists. If it does not, it creates the data and sets the `reindex` flag, which indicates that the data must be resorted and saved again. Otherwise, it retrieves the data and compares the saved <see cref="T:System.Globalization.SortVersion" /> object with the <see cref="T:System.Globalization.SortVersion" /> object for the current culture on the current system. If they are not equal, or if the `reindex` flag had been set previously, it resorts to the <see cref="T:System.Globalization.RegionInfo" /> data.
<remarks>
<format type="text/markdown"><![CDATA[
:::code language="csharp" source="~/snippets/csharp/System.Globalization/SortVersion/Overview/example1.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.globalization.sortversion/vb/example1.vb" id="Snippet1":::
]]></format></example>

## Remarks

For more information about this API, see [Supplemental API remarks for SortVersion](/dotnet/fundamentals/runtime-libraries/system-globalization-sortversion).

## Example

The following example contains a portion of the source code from an application that uses the <xref:System.Globalization.SortVersion> class to ensure that the native names of <xref:System.Globalization.RegionInfo> objects are ordered appropriately for the current system and current culture. It uses the <xref:System.IO.BinaryReader> and <xref:System.IO.BinaryWriter> objects to store and retrieve ordered data from a data file named `Regions.dat` rather than retrieving and ordering data each time the application is run. The example first checks to determine whether the data file exists. If it does not, it creates the data and sets the `reindex` flag, which indicates that the data must be resorted and saved again. Otherwise, it retrieves the data and compares the saved <xref:System.Globalization.SortVersion> object with the <xref:System.Globalization.SortVersion> object for the current culture on the current system. If they aren't equal, or if the `reindex` flag had been set previously, it resorts to the <xref:System.Globalization.RegionInfo> data.

:::code language="csharp" source="~/snippets/csharp/System.Globalization/SortVersion/Overview/example1.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR_System/system.globalization.sortversion/vb/example1.vb" id="Snippet1":::

]]></format>
</remarks>
<altmember cref="P:System.Globalization.CompareInfo.Version" />
</Docs>
<Members>
Expand Down