Skip to content

Commit 12286c9

Browse files
committed
fix build suggestion
1 parent a53d96b commit 12286c9

File tree

3 files changed

+54
-90
lines changed

3 files changed

+54
-90
lines changed

xml/System.Globalization/NumberFormatInfo.xml

Lines changed: 45 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -82,14 +82,20 @@
8282
</Attributes>
8383
<Docs>
8484
<summary>Provides culture-specific information for formatting and parsing numeric values.</summary>
85-
<remarks>For more information about this API, see <see href="/dotnet/fundamentals/runtime-libraries/system-globalization-numberformatinfo">Supplemental API remarks for NumberFormatInfo</see>.</remarks>
86-
<example>
87-
The following example shows how to retrieve a <see cref="T:System.Globalization.NumberFormatInfo" /> object for a corresponding <see cref="T:System.Globalization.CultureInfo" /> object, and use the retrieved object to query number formatting information for the particular culture.
85+
<remarks>
8886
<format type="text/markdown"><![CDATA[
87+
88+
For more information about this API, see [Supplemental API remarks for NumberFormatInfo](/dotnet/fundamentals/runtime-libraries/system-globalization-numberformatinfo).
89+
90+
## Example
91+
92+
The following example shows how to retrieve a <see cref="T:System.Globalization.NumberFormatInfo" /> object for a corresponding <see cref="T:System.Globalization.CultureInfo" /> object, and use the retrieved object to query number formatting information for the particular culture.
93+
8994
:::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR/NumberFormatInfo/cpp/NumberFormatInfo.cpp" id="Snippet1":::
9095
:::code language="csharp" source="~/snippets/csharp/System.Globalization/NumberFormatInfo/Overview/NumberFormatInfo.cs" id="Snippet1":::
9196
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR/NumberFormatInfo/vb/numberformatinfo.vb" id="Snippet1":::
92-
]]></format></example>
97+
]]></format>
98+
</remarks>
9399
<altmember cref="T:System.Globalization.CultureInfo" />
94100
<altmember cref="T:System.IFormatProvider" />
95101
<related type="Article" href="/dotnet/standard/base-types/custom-numeric-format-strings">Custom Numeric Format Strings</related>
@@ -272,8 +278,6 @@
272278
## Remarks
273279
The <xref:System.Globalization.NumberFormatInfo.CurrencyDecimalDigits%2A> property is used with the "C" standard format string without a precision specifier in numeric formatting operations. It defines the default number of fractional digits that appear after the decimal separator. This value is overridden if a precision specifier is used. For more information, see [Standard Numeric Format Strings](/dotnet/standard/base-types/standard-numeric-format-strings).
274280
275-
276-
277281
## Examples
278282
The following example demonstrates the effect of changing the <xref:System.Globalization.NumberFormatInfo.CurrencyDecimalDigits%2A> property.
279283
@@ -341,12 +345,10 @@
341345
<format type="text/markdown"><![CDATA[
342346
343347
## Remarks
344-
The initial value of this property is derived from the settings in the **Region and Language** item in Control Panel.
348+
On Windows, the initial value of this property is derived from the settings in the **Region and Language** item in Control Panel.
345349
346350
The <xref:System.Globalization.NumberFormatInfo.CurrencyDecimalSeparator%2A> property is used with the "C" standard format string to define the symbol that separates integral from fractional digits. For more information, see [Standard Numeric Format Strings](/dotnet/standard/base-types/standard-numeric-format-strings).
347351
348-
349-
350352
## Examples
351353
The following example demonstrates the effect of changing the <xref:System.Globalization.NumberFormatInfo.CurrencyDecimalSeparator%2A> property.
352354
@@ -415,12 +417,10 @@
415417
<format type="text/markdown"><![CDATA[
416418
417419
## Remarks
418-
The initial value of this property is derived from the settings in the **Regional and Language** item in Control Panel.
420+
On Windows, the initial value of this property is derived from the settings in the **Regional and Language** item in Control Panel.
419421
420422
The <xref:System.Globalization.NumberFormatInfo.CurrencyGroupSeparator%2A> property is used with the "C" standard format string to define the symbol that separates groups of integral digits. For more information, see [Standard Numeric Format Strings](/dotnet/standard/base-types/standard-numeric-format-strings).
421423
422-
423-
424424
## Examples
425425
The following example demonstrates the effect of changing the <xref:System.Globalization.NumberFormatInfo.CurrencyGroupSeparator%2A> property.
426426
@@ -726,8 +726,6 @@ The pattern does not support a positive sign.
726726
## Remarks
727727
The string assigned to the <xref:System.Globalization.NumberFormatInfo.CurrencySymbol%2A> property is included in the result string when a numeric value is formatted with the "C" [standard numeric format string](/dotnet/standard/base-types/standard-numeric-format-strings).
728728
729-
730-
731729
## Examples
732730
The following example displays the currency symbol for the current culture and uses the "C" standard numeric format string to format a currency value.
733731
@@ -803,8 +801,6 @@ The pattern does not support a positive sign.
803801
## Remarks
804802
Retrieving a <xref:System.Globalization.NumberFormatInfo> object from the <xref:System.Globalization.NumberFormatInfo.CurrentInfo%2A> property is equivalent to retrieving a <xref:System.Globalization.NumberFormatInfo> object from the `CultureInfo.CurrentCulture.NumberFormat` property.
805803
806-
807-
808804
## Examples
809805
The following example shows that the objects returned by the <xref:System.Globalization.NumberFormatInfo.CurrentInfo%2A> and `CultureInfo.CurrentCulture.NumberFormat` properties are identical. It then uses reflection to display the property values of the <xref:System.Globalization.NumberFormatInfo> object returned by the <xref:System.Globalization.NumberFormatInfo.CurrentInfo%2A> property on a system whose current culture is en-US.
810806
@@ -865,10 +861,8 @@ The pattern does not support a positive sign.
865861
<remarks>
866862
<format type="text/markdown"><![CDATA[
867863
868-
## Remarks
869-
870864
> [!IMPORTANT]
871-
> The <xref:System.Globalization.NumberFormatInfo.DigitSubstitution%2A> property is reserved for future use. Currently, it is not used in either parsing or formatting operations for the current <xref:System.Globalization.NumberFormatInfo> object.
865+
> The <xref:System.Globalization.NumberFormatInfo.DigitSubstitution%2A> property is reserved for future use. Currently, it is not used in either parsing or formatting operations for the current <xref:System.Globalization.NumberFormatInfo> object.
872866
873867
]]></format>
874868
</remarks>
@@ -1010,9 +1004,8 @@ The pattern does not support a positive sign.
10101004
10111005
Your application gets a <xref:System.Globalization.NumberFormatInfo> object for a specific culture using one of the following methods:
10121006
1013-
- Through the <xref:System.Globalization.CultureInfo.NumberFormat%2A?displayProperty=nameWithType> property.
1014-
1015-
- Through the <xref:System.Globalization.NumberFormatInfo.GetInstance%2A> method where `provider` is a <xref:System.Globalization.CultureInfo>.
1007+
- Through the <xref:System.Globalization.CultureInfo.NumberFormat%2A?displayProperty=nameWithType> property.
1008+
- Through the <xref:System.Globalization.NumberFormatInfo.GetInstance%2A> method where `provider` is a <xref:System.Globalization.CultureInfo>.
10161009
10171010
A <xref:System.Globalization.NumberFormatInfo> object is created only for the invariant culture or for specific cultures, not for neutral cultures. For more information about the invariant culture, specific cultures, and neutral cultures, see the <xref:System.Globalization.CultureInfo> class.
10181011
@@ -1069,8 +1062,6 @@ The pattern does not support a positive sign.
10691062
## Remarks
10701063
This <xref:System.Globalization.NumberFormatInfo> object returned by this property does not change, regardless of the current culture. It represents the formatting conventions of the invariant culture, which is a culture associated with the English language but not with any country/region. The invariant culture is used in formatting operations that are culture-independent or that produce result strings suitable for display across multiple cultures.
10711064
1072-
1073-
10741065
## Examples
10751066
The following example displays the default property values of the <xref:System.Globalization.NumberFormatInfo.InvariantInfo%2A>.
10761067
@@ -1248,9 +1239,7 @@ The pattern does not support a positive sign.
12481239
## Remarks
12491240
12501241
> [!IMPORTANT]
1251-
> The character set that is specified by the <xref:System.Globalization.NumberFormatInfo.NativeDigits%2A> property has no effect on parsing or formatting operations. Only the Basic Latin digits 0 (U+0030) through 9 (U+0039) are used when formatting or parsing numeric values or date and time values.
1252-
1253-
1242+
> The character set that's specified by the <xref:System.Globalization.NumberFormatInfo.NativeDigits%2A> property has no effect on parsing or formatting operations. Only the Basic Latin digits 0 (U+0030) through 9 (U+0039) are used when formatting or parsing numeric values or date and time values.
12541243
12551244
## Examples
12561245
The following example demonstrates the <xref:System.Globalization.NumberFormatInfo.NativeDigits%2A> property.
@@ -1328,7 +1317,6 @@ The pattern does not support a positive sign.
13281317
<remarks>
13291318
<format type="text/markdown"><![CDATA[
13301319
1331-
## Remarks
13321320
For more information on negative infinity, see <xref:System.Double> or <xref:System.Single>.
13331321
13341322
]]></format>
@@ -1387,8 +1375,6 @@ The pattern does not support a positive sign.
13871375
## Remarks
13881376
This property is used in both formatting and parsing operations. For more information on its use in formatting operations, see the [Standard Numeric Format Strings](/dotnet/standard/base-types/standard-numeric-format-strings) and [Custom Numeric Format Strings](/dotnet/standard/base-types/custom-numeric-format-strings) topics.
13891377
1390-
1391-
13921378
## Examples
13931379
The following example instantiates a read-write <xref:System.Globalization.CultureInfo> object that represents the invariant culture and assigns the OVERLINE character (U+203E) to its <xref:System.Globalization.NumberFormatInfo.NegativeSign%2A> property. It then uses this <xref:System.Globalization.CultureInfo> object to format an array of negative floating-point numbers.
13941380
@@ -1450,8 +1436,6 @@ The pattern does not support a positive sign.
14501436
## Remarks
14511437
The <xref:System.Globalization.NumberFormatInfo.NumberDecimalDigits%2A> property is used with the "F" and "N" standard format strings without a precision specifier in numeric formatting operations. It defines the default number of fractional digits that appear after the decimal separator. This value is overridden if a precision specifier is used. For more information, see [Standard Numeric Format Strings](/dotnet/standard/base-types/standard-numeric-format-strings).
14521438
1453-
1454-
14551439
## Examples
14561440
The following example demonstrates the effect of changing the <xref:System.Globalization.NumberFormatInfo.NumberDecimalDigits%2A> property.
14571441
@@ -1520,9 +1504,7 @@ The pattern does not support a positive sign.
15201504
## Remarks
15211505
The <xref:System.Globalization.NumberFormatInfo.NumberDecimalSeparator%2A> property is used with the "E", "F", "G", "N", and "R" standard format strings to define the symbol that separates integral from fractional digits. For more information, see [Standard Numeric Format Strings](/dotnet/standard/base-types/standard-numeric-format-strings).
15221506
1523-
The initial value of this property is derived from the settings in the **Region and Language** item in Control Panel.
1524-
1525-
1507+
On Windows, the initial value of this property is derived from the settings in the **Region and Language** item in Control Panel.
15261508
15271509
## Examples
15281510
The following example demonstrates the effect of changing the <xref:System.Globalization.NumberFormatInfo.NumberDecimalSeparator%2A> property.
@@ -1593,9 +1575,7 @@ The pattern does not support a positive sign.
15931575
## Remarks
15941576
The <xref:System.Globalization.NumberFormatInfo.NumberGroupSeparator%2A> property is used with the "N" standard format string to define the symbol that separates groups of integral digits. For more information, see [Standard Numeric Format Strings](/dotnet/standard/base-types/standard-numeric-format-strings).
15951577
1596-
The initial value of this property is derived from the settings in the **Region and Language** item in Control Panel.
1597-
1598-
1578+
On Windows, the initial value of this property is derived from the settings in the **Region and Language** item in Control Panel.
15991579
16001580
## Examples
16011581
The following example demonstrates the effect of changing the <xref:System.Globalization.NumberFormatInfo.NumberGroupSeparator%2A> property.
@@ -1671,8 +1651,6 @@ The pattern does not support a positive sign.
16711651
16721652
For example, if the array contains { 3, 4, 5 }, the digits are grouped similar to "55,55555,55555,55555,4444,333.00". If the array contains { 3, 4, 0 }, the digits are grouped similar to "55555555555555555,4444,333.00".
16731653
1674-
1675-
16761654
## Examples
16771655
The following example demonstrates the effect of changing the <xref:System.Globalization.NumberFormatInfo.NumberGroupSizes%2A> property.
16781656
@@ -1752,18 +1730,16 @@ The pattern does not support a positive sign.
17521730
## Remarks
17531731
The <xref:System.Globalization.NumberFormatInfo.NumberNegativePattern%2A> property defines the format of negative values formatted with the "N" standard numeric format string. This property has one of the values in the following table. The symbol "-" is the <xref:System.Globalization.NumberFormatInfo.NegativeSign%2A> and `n` is a number.
17541732
1755-
|Value|Associated pattern|
1756-
|-----------|------------------------|
1757-
|0|(n)|
1758-
|1|-n|
1759-
|2|- n|
1760-
|3|n-|
1761-
|4|n -|
1733+
| Value | Associated pattern |
1734+
|-------|--------------------|
1735+
| 0 | (n) |
1736+
| 1 | -n |
1737+
| 2 | - n |
1738+
| 3 | n- |
1739+
| 4 | n - |
17621740
17631741
The default value for the invariant culture returned by the <xref:System.Globalization.NumberFormatInfo.InvariantInfo%2A> property is 1, which represents "-n", where *n* is a number.
17641742
1765-
1766-
17671743
## Examples
17681744
The following example displays a value using different <xref:System.Globalization.NumberFormatInfo.NumberNegativePattern%2A> patterns.
17691745
@@ -1832,8 +1808,6 @@ The pattern does not support a positive sign.
18321808
## Remarks
18331809
The <xref:System.Globalization.NumberFormatInfo.PercentDecimalDigits%2A> property is used with the "P" standard format string without a precision specifier in numeric formatting operations. It defines the default number of fractional digits that appear after the decimal separator. This value is overridden if a precision specifier is used. For more information, see [Standard Numeric Format Strings](/dotnet/standard/base-types/standard-numeric-format-strings).
18341810
1835-
1836-
18371811
## Examples
18381812
The following example demonstrates the effect of changing the <xref:System.Globalization.NumberFormatInfo.PercentDecimalDigits%2A> property.
18391813
@@ -1903,8 +1877,6 @@ The pattern does not support a positive sign.
19031877
## Remarks
19041878
The <xref:System.Globalization.NumberFormatInfo.PercentDecimalSeparator%2A> property is used with the "P" standard format string to define the symbol that separates integral from fractional digits. For more information, see [Standard Numeric Format Strings](/dotnet/standard/base-types/standard-numeric-format-strings).
19051879
1906-
1907-
19081880
## Examples
19091881
The following example demonstrates the effect of changing the <xref:System.Globalization.NumberFormatInfo.PercentDecimalSeparator%2A> property.
19101882
@@ -1975,8 +1947,6 @@ The pattern does not support a positive sign.
19751947
## Remarks
19761948
The <xref:System.Globalization.NumberFormatInfo.PercentGroupSeparator%2A> property is used with the "P" standard format string to define the symbol that separates groups of integers. For more information, see [Standard Numeric Format Strings](/dotnet/standard/base-types/standard-numeric-format-strings).
19771949
1978-
1979-
19801950
## Examples
19811951
The following example demonstrates the effect of changing the <xref:System.Globalization.NumberFormatInfo.PercentGroupSeparator%2A> property.
19821952
@@ -2050,8 +2020,6 @@ The pattern does not support a positive sign.
20502020
20512021
For example, if the array contains { 3, 4, 5 }, the digits are grouped similar to "55,55555,55555,55555,4444,333.00%". If the array contains { 3, 4, 0 }, the digits are grouped similar to "55555555555555555,4444,333.00%".
20522022
2053-
2054-
20552023
## Examples
20562024
The following example demonstrates the effect of changing the <xref:System.Globalization.NumberFormatInfo.PercentGroupSizes%2A> property.
20572025
@@ -2126,20 +2094,20 @@ The pattern does not support a positive sign.
21262094
## Remarks
21272095
The <xref:System.Globalization.NumberFormatInfo.PercentNegativePattern%2A> property is used with the "P" standard format string to define the pattern of negative percentage values. For more information, see [Standard Numeric Format Strings](/dotnet/standard/base-types/standard-numeric-format-strings). This property has one of the values in the following table. The symbol "%" is the <xref:System.Globalization.NumberFormatInfo.PercentSymbol%2A>, the symbol "-" is the <xref:System.Globalization.NumberFormatInfo.NegativeSign%2A>, and `n` is a number. Values 3-11 were introduced in the .NET Framework 2.0 and cannot be used in earlier versions.
21282096
2129-
|Value|Associated pattern|
2130-
|-----------|------------------------|
2131-
|0|-n %|
2132-
|1|-n%|
2133-
|2|-%n|
2134-
|3|%-n|
2135-
|4|%n-|
2136-
|5|n-%|
2137-
|6|n%-|
2138-
|7|-% n|
2139-
|8|n %-|
2140-
|9|% n-|
2141-
|10|% -n|
2142-
|11|n- %|
2097+
| Value | Associated pattern |
2098+
|-------|--------------------|
2099+
| 0 | -n % |
2100+
| 1 | -n% |
2101+
| 2 | -%n |
2102+
| 3 | %-n |
2103+
| 4 | %n- |
2104+
| 5 | n-% |
2105+
| 6 | n%- |
2106+
| 7 | -% n |
2107+
| 8 | n %- |
2108+
| 9 | % n- |
2109+
| 10 | % -n |
2110+
| 11 | n- % |
21432111
21442112
]]></format>
21452113
</remarks>
@@ -2203,12 +2171,12 @@ The pattern does not support a positive sign.
22032171
## Remarks
22042172
The <xref:System.Globalization.NumberFormatInfo.PercentPositivePattern%2A> property is used with the "P" standard format string to define pattern of positive percentage values. For more information, see [Standard Numeric Format Strings](/dotnet/standard/base-types/standard-numeric-format-strings). This property has one of the values in the following table. The symbol "%" is the <xref:System.Globalization.NumberFormatInfo.PercentSymbol%2A> and `n` is a number.
22052173
2206-
|Value|Associated pattern|
2207-
|-----------|------------------------|
2208-
|0|n %|
2209-
|1|n%|
2210-
|2|%n|
2211-
|3|% n|
2174+
| Value | Associated pattern |
2175+
|-------|--------------------|
2176+
| 0 | n % |
2177+
| 1 | n% |
2178+
| 2 | %n |
2179+
| 3 | % n |
22122180
22132181
]]></format>
22142182
</remarks>

0 commit comments

Comments
 (0)