CurrencyFormatter class
Formats and parses currencies.
Syntax
var currencyFormatter = new Windows.Globalization.NumberFormatting.CurrencyFormatter(string); var currencyFormatter = new Windows.Globalization.NumberFormatting.CurrencyFormatter(string, iIterable(String);
Attributes
- ActivatableAttribute(Windows.Globalization.NumberFormatting.ICurrencyFormatterFactory, NTDDI_WIN8)
- DualApiPartitionAttribute()
- MarshalingBehaviorAttribute(Agile)
- ThreadingAttribute(Both)
- VersionAttribute(NTDDI_WIN8)
Members
The CurrencyFormatter class has these types of members:
Constructors
The CurrencyFormatter class has these constructors.
| Constructor | Description |
|---|---|
| CurrencyFormatter(String) | Creates a CurrencyFormatter object that is initialized with a currency identifier. |
| CurrencyFormatter(String, IIterable(String), String) | Creates a CurrencyFormatter object initialized with a currency identifier, language list, and geographic region. |
Methods
The CurrencyFormatter class has these methods. With C#, Visual Basic, and C++, it also inherits methods from the Object class.
| Method | Description |
|---|---|
| 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 | Returns a string representation of a Double currency value. |
| FormatInt | Returns a string representation of an Int64 currency value. |
| FormatUInt | Returns a string representation of a UInt64 currency value. |
| ParseDouble | Attempts to parse a string representation of a Double currency value. |
| ParseInt | Attempts to parse a string representation of an integer currency value. |
| ParseUInt | Attempts to parse a string representation of an unsigned integer currency value. |
Properties
The CurrencyFormatter class has these properties.
| Property | Access type | Description |
|---|---|---|
| Read/write | Gets or sets the identifier for the currency to be used for formatting and parsing currency values. | |
| Read/write | Gets or sets the minimum number of digits to display for the fraction part of the currency value. | |
| Read-only | Gets the region that is used when formatting and parsing currency values. | |
| Read/write | Gets or sets the minimum number of digits to display for the integer part of the currency value. | |
| Read/write | Gets or sets whether the decimal point of the currency value should always be displayed. | |
| Read/write | Gets or sets whether the integer part of the currency value should be grouped. | |
| Read-only | Gets the priority list of language identifiers that is used when formatting and parsing currency values. | |
| Read/write | Gets or sets the numbering system that is used to format and parse currency values. | |
| Read-only | Gets the geographic region that was most recently used to format or parse currency values. | |
| Read-only | Gets the language that was most recently used to format or parse currency values. |
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.
Requirements
|
Minimum supported client | Windows 8 [Windows Store apps, desktop apps] |
|---|---|
|
Minimum supported server | Windows Server 2012 [Windows Store apps, desktop apps] |
|
Namespace |
|
|
Metadata |
|
See also
Build date: 12/4/2012
