|
82 | 82 | </Attributes>
|
83 | 83 | <Docs>
|
84 | 84 | <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> |
88 | 86 | <format type="text/markdown"><. |
| 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 | +
|
89 | 94 | :::code language="cpp" source="~/snippets/cpp/VS_Snippets_CLR/NumberFormatInfo/cpp/NumberFormatInfo.cpp" id="Snippet1":::
|
90 | 95 | :::code language="csharp" source="~/snippets/csharp/System.Globalization/NumberFormatInfo/Overview/NumberFormatInfo.cs" id="Snippet1":::
|
91 | 96 | :::code language="vb" source="~/snippets/visualbasic/VS_Snippets_CLR/NumberFormatInfo/vb/numberformatinfo.vb" id="Snippet1":::
|
92 |
| - ]]></format></example> |
| 97 | + ]]></format> |
| 98 | + </remarks> |
93 | 99 | <altmember cref="T:System.Globalization.CultureInfo" />
|
94 | 100 | <altmember cref="T:System.IFormatProvider" />
|
95 | 101 | <related type="Article" href="/dotnet/standard/base-types/custom-numeric-format-strings">Custom Numeric Format Strings</related>
|
|
272 | 278 | ## Remarks
|
273 | 279 | 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).
|
274 | 280 |
|
275 |
| -
|
276 |
| -
|
277 | 281 | ## Examples
|
278 | 282 | The following example demonstrates the effect of changing the <xref:System.Globalization.NumberFormatInfo.CurrencyDecimalDigits%2A> property.
|
279 | 283 |
|
|
341 | 345 | <format type="text/markdown"><.
|
347 | 351 |
|
348 |
| -
|
349 |
| -
|
350 | 352 | ## Examples
|
351 | 353 | The following example demonstrates the effect of changing the <xref:System.Globalization.NumberFormatInfo.CurrencyDecimalSeparator%2A> property.
|
352 | 354 |
|
|
415 | 417 | <format type="text/markdown"><.
|
421 | 423 |
|
422 |
| -
|
423 |
| -
|
424 | 424 | ## Examples
|
425 | 425 | The following example demonstrates the effect of changing the <xref:System.Globalization.NumberFormatInfo.CurrencyGroupSeparator%2A> property.
|
426 | 426 |
|
@@ -726,8 +726,6 @@ The pattern does not support a positive sign.
|
726 | 726 | ## Remarks
|
727 | 727 | 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).
|
728 | 728 |
|
729 |
| -
|
730 |
| -
|
731 | 729 | ## Examples
|
732 | 730 | The following example displays the currency symbol for the current culture and uses the "C" standard numeric format string to format a currency value.
|
733 | 731 |
|
@@ -803,8 +801,6 @@ The pattern does not support a positive sign.
|
803 | 801 | ## Remarks
|
804 | 802 | 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.
|
805 | 803 |
|
806 |
| -
|
807 |
| -
|
808 | 804 | ## Examples
|
809 | 805 | 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.
|
810 | 806 |
|
@@ -865,10 +861,8 @@ The pattern does not support a positive sign.
|
865 | 861 | <remarks>
|
866 | 862 | <format type="text/markdown"><![CDATA[
|
867 | 863 |
|
868 |
| -## Remarks |
869 |
| -
|
870 | 864 | > [!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. |
872 | 866 |
|
873 | 867 | ]]></format>
|
874 | 868 | </remarks>
|
@@ -1010,9 +1004,8 @@ The pattern does not support a positive sign.
|
1010 | 1004 |
|
1011 | 1005 | Your application gets a <xref:System.Globalization.NumberFormatInfo> object for a specific culture using one of the following methods:
|
1012 | 1006 |
|
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>. |
1016 | 1009 |
|
1017 | 1010 | 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.
|
1018 | 1011 |
|
@@ -1069,8 +1062,6 @@ The pattern does not support a positive sign.
|
1069 | 1062 | ## Remarks
|
1070 | 1063 | 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.
|
1071 | 1064 |
|
1072 |
| -
|
1073 |
| -
|
1074 | 1065 | ## Examples
|
1075 | 1066 | The following example displays the default property values of the <xref:System.Globalization.NumberFormatInfo.InvariantInfo%2A>.
|
1076 | 1067 |
|
@@ -1248,9 +1239,7 @@ The pattern does not support a positive sign.
|
1248 | 1239 | ## Remarks
|
1249 | 1240 |
|
1250 | 1241 | > [!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. |
1254 | 1243 |
|
1255 | 1244 | ## Examples
|
1256 | 1245 | The following example demonstrates the <xref:System.Globalization.NumberFormatInfo.NativeDigits%2A> property.
|
@@ -1328,7 +1317,6 @@ The pattern does not support a positive sign.
|
1328 | 1317 | <remarks>
|
1329 | 1318 | <format type="text/markdown"><![CDATA[
|
1330 | 1319 |
|
1331 |
| -## Remarks |
1332 | 1320 | For more information on negative infinity, see <xref:System.Double> or <xref:System.Single>.
|
1333 | 1321 |
|
1334 | 1322 | ]]></format>
|
@@ -1387,8 +1375,6 @@ The pattern does not support a positive sign.
|
1387 | 1375 | ## Remarks
|
1388 | 1376 | 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.
|
1389 | 1377 |
|
1390 |
| -
|
1391 |
| -
|
1392 | 1378 | ## Examples
|
1393 | 1379 | 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.
|
1394 | 1380 |
|
@@ -1450,8 +1436,6 @@ The pattern does not support a positive sign.
|
1450 | 1436 | ## Remarks
|
1451 | 1437 | 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).
|
1452 | 1438 |
|
1453 |
| -
|
1454 |
| -
|
1455 | 1439 | ## Examples
|
1456 | 1440 | The following example demonstrates the effect of changing the <xref:System.Globalization.NumberFormatInfo.NumberDecimalDigits%2A> property.
|
1457 | 1441 |
|
@@ -1520,9 +1504,7 @@ The pattern does not support a positive sign.
|
1520 | 1504 | ## Remarks
|
1521 | 1505 | 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).
|
1522 | 1506 |
|
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. |
1526 | 1508 |
|
1527 | 1509 | ## Examples
|
1528 | 1510 | 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.
|
1593 | 1575 | ## Remarks
|
1594 | 1576 | 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).
|
1595 | 1577 |
|
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. |
1599 | 1579 |
|
1600 | 1580 | ## Examples
|
1601 | 1581 | 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.
|
1671 | 1651 |
|
1672 | 1652 | 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".
|
1673 | 1653 |
|
1674 |
| -
|
1675 |
| -
|
1676 | 1654 | ## Examples
|
1677 | 1655 | The following example demonstrates the effect of changing the <xref:System.Globalization.NumberFormatInfo.NumberGroupSizes%2A> property.
|
1678 | 1656 |
|
@@ -1752,18 +1730,16 @@ The pattern does not support a positive sign.
|
1752 | 1730 | ## Remarks
|
1753 | 1731 | 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.
|
1754 | 1732 |
|
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 - | |
1762 | 1740 |
|
1763 | 1741 | 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.
|
1764 | 1742 |
|
1765 |
| -
|
1766 |
| -
|
1767 | 1743 | ## Examples
|
1768 | 1744 | The following example displays a value using different <xref:System.Globalization.NumberFormatInfo.NumberNegativePattern%2A> patterns.
|
1769 | 1745 |
|
@@ -1832,8 +1808,6 @@ The pattern does not support a positive sign.
|
1832 | 1808 | ## Remarks
|
1833 | 1809 | 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).
|
1834 | 1810 |
|
1835 |
| -
|
1836 |
| -
|
1837 | 1811 | ## Examples
|
1838 | 1812 | The following example demonstrates the effect of changing the <xref:System.Globalization.NumberFormatInfo.PercentDecimalDigits%2A> property.
|
1839 | 1813 |
|
@@ -1903,8 +1877,6 @@ The pattern does not support a positive sign.
|
1903 | 1877 | ## Remarks
|
1904 | 1878 | 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).
|
1905 | 1879 |
|
1906 |
| -
|
1907 |
| -
|
1908 | 1880 | ## Examples
|
1909 | 1881 | The following example demonstrates the effect of changing the <xref:System.Globalization.NumberFormatInfo.PercentDecimalSeparator%2A> property.
|
1910 | 1882 |
|
@@ -1975,8 +1947,6 @@ The pattern does not support a positive sign.
|
1975 | 1947 | ## Remarks
|
1976 | 1948 | 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).
|
1977 | 1949 |
|
1978 |
| -
|
1979 |
| -
|
1980 | 1950 | ## Examples
|
1981 | 1951 | The following example demonstrates the effect of changing the <xref:System.Globalization.NumberFormatInfo.PercentGroupSeparator%2A> property.
|
1982 | 1952 |
|
@@ -2050,8 +2020,6 @@ The pattern does not support a positive sign.
|
2050 | 2020 |
|
2051 | 2021 | 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%".
|
2052 | 2022 |
|
2053 |
| -
|
2054 |
| -
|
2055 | 2023 | ## Examples
|
2056 | 2024 | The following example demonstrates the effect of changing the <xref:System.Globalization.NumberFormatInfo.PercentGroupSizes%2A> property.
|
2057 | 2025 |
|
@@ -2126,20 +2094,20 @@ The pattern does not support a positive sign.
|
2126 | 2094 | ## Remarks
|
2127 | 2095 | 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.
|
2128 | 2096 |
|
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- % | |
2143 | 2111 |
|
2144 | 2112 | ]]></format>
|
2145 | 2113 | </remarks>
|
@@ -2203,12 +2171,12 @@ The pattern does not support a positive sign.
|
2203 | 2171 | ## Remarks
|
2204 | 2172 | 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.
|
2205 | 2173 |
|
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 | |
2212 | 2180 |
|
2213 | 2181 | ]]></format>
|
2214 | 2182 | </remarks>
|
|
0 commit comments