CurrencyFormatter Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Formats and parses currencies.
public ref class CurrencyFormatter sealed : INumberRounderOption, ISignedZeroOption, ISignificantDigitsOption
/// [Windows.Foundation.Metadata.Activatable(Windows.Globalization.NumberFormatting.ICurrencyFormatterFactory, 65536, Windows.Foundation.UniversalApiContract)]
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class CurrencyFormatter final : INumberRounderOption, ISignedZeroOption, ISignificantDigitsOption
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
/// [Windows.Foundation.Metadata.Activatable(Windows.Globalization.NumberFormatting.ICurrencyFormatterFactory, 65536, "Windows.Foundation.UniversalApiContract")]
class CurrencyFormatter final : INumberRounderOption, ISignedZeroOption, ISignificantDigitsOption
[Windows.Foundation.Metadata.Activatable(typeof(Windows.Globalization.NumberFormatting.ICurrencyFormatterFactory), 65536, typeof(Windows.Foundation.UniversalApiContract))]
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public sealed class CurrencyFormatter : INumberRounderOption, ISignedZeroOption, ISignificantDigitsOption
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
[Windows.Foundation.Metadata.Activatable(typeof(Windows.Globalization.NumberFormatting.ICurrencyFormatterFactory), 65536, "Windows.Foundation.UniversalApiContract")]
public sealed class CurrencyFormatter : INumberRounderOption, ISignedZeroOption, ISignificantDigitsOption
function CurrencyFormatter(currencyCode, languages, geographicRegion)
Public NotInheritable Class CurrencyFormatter
Implements INumberRounderOption, ISignedZeroOption, ISignificantDigitsOption
- Inheritance
- Attributes
- Implements
Windows requirements
Device family |
Windows 10 (introduced in 10.0.10240.0)
|
API contract |
Windows.Foundation.UniversalApiContract (introduced in v1.0)
|
Remarks
If your app passes language tags used in this class to any National Language Support functions, it must first convert the tags by calling ResolveLocaleName.
Constructors
CurrencyFormatter(String, IIterable<String>, String) |
Creates a CurrencyFormatter object initialized with a currency identifier, language list, and geographic region. |
CurrencyFormatter(String) |
Creates a CurrencyFormatter object that is initialized with a currency identifier. |
Properties
Currency |
Note Currency may be read-only for releases after Windows 8.1. Instead, use a new CurrencyFormatter. Gets the identifier for the currency to be used for formatting and parsing currency values. |
FractionDigits |
Gets or sets the minimum number of digits to display for the fraction part of the currency value. |
GeographicRegion |
Gets the region that is used when formatting and parsing currency values. |
IntegerDigits |
Gets or sets the minimum number of digits to display for the integer part of the currency value. |
IsDecimalPointAlwaysDisplayed |
Gets or sets whether the decimal point of the currency value should always be displayed. |
IsGrouped |
Gets or sets whether the integer part of the currency value should be grouped. The default value is |
IsZeroSigned |
Gets or sets whether -0 is formatted using the conventions for negative numbers or for positive numbers. (In the Latin numeral system, the choice is "-0" or "0".) |
Languages |
Gets the priority list of language identifiers that is used when formatting and parsing currency values. |
Mode |
Gets or sets whether the currency is formatted with the currency symbol or currency code. |
NumberRounder |
Gets or sets the current rounding strategy to be used when formatting currency amounts. |
NumeralSystem |
Gets or sets the numbering system that is used to format and parse currency values. |
ResolvedGeographicRegion |
Gets the geographic region that was most recently used to format or parse currency values. |
ResolvedLanguage |
Gets the language that was most recently used to format or parse currency values. |
SignificantDigits |
Gets or sets the current padding to significant digits when a currency amount is formatted. |
Methods
ApplyRoundingForCurrency(RoundingAlgorithm) |
Applies the specified rounding algorithm to the CurrencyFormatter. |
Format(Double) |
Returns a string representation of a Double currency value. |
Format(Int64) |
Returns a string representation of an Int64 currency value. |
Format(UInt64) |
Returns a string representation of a UInt64 currency value. |
FormatDouble(Double) |
Returns a string representation of a Double currency value. |
FormatInt(Int64) |
Returns a string representation of an Int64 currency value. |
FormatUInt(UInt64) |
Returns a string representation of a UInt64 currency value. |
ParseDouble(String) |
Attempts to parse a string representation of a Double currency value. |
ParseInt(String) |
Attempts to parse a string representation of an integer currency value. |
ParseUInt(String) |
Attempts to parse a string representation of an unsigned integer currency value. |