Share via


CurrencyFormatter Constructors

Definition

Overloads

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.

CurrencyFormatter(String)

Creates a CurrencyFormatter object that is initialized with a currency identifier.

public:
 CurrencyFormatter(Platform::String ^ currencyCode);
 CurrencyFormatter(winrt::hstring const& currencyCode);
public CurrencyFormatter(string currencyCode);
function CurrencyFormatter(currencyCode)
Public Sub New (currencyCode As String)

Parameters

currencyCode
String

Platform::String

winrt::hstring

The currency identifier to use when formatting and parsing currency values.

See also

Applies to

CurrencyFormatter(String, IIterable<String>, String)

Creates a CurrencyFormatter object initialized with a currency identifier, language list, and geographic region.

public:
 CurrencyFormatter(Platform::String ^ currencyCode, IIterable<Platform::String ^> ^ languages, Platform::String ^ geographicRegion);
 CurrencyFormatter(winrt::hstring const& currencyCode, IIterable<winrt::hstring> const& languages, winrt::hstring const& geographicRegion);
public CurrencyFormatter(string currencyCode, IEnumerable<string> languages, string geographicRegion);
function CurrencyFormatter(currencyCode, languages, geographicRegion)
Public Sub New (currencyCode As String, languages As IEnumerable(Of String), geographicRegion As String)

Parameters

currencyCode
String

Platform::String

winrt::hstring

The currency identifier to use when formatting and parsing currency values.

languages

IIterable<String>

IEnumerable<String>

IIterable<Platform::String>

IIterable<winrt::hstring>

The list of language identifiers, in priority order, representing the choice of languages. See Remarks.

geographicRegion
String

Platform::String

winrt::hstring

The identifier for the geographic region.

Remarks

In the case that the symbol for the provided currency is the same symbol as that of a different currency in the provided region (or the home region if none is provided), formatting may use a currency code even if the Mode property is UseSymbol. This is to avoid ambiguity. For example, CurrencyFormatter ("USD", ["en"], "CA") creates a formatter that formats 3 as 3 CAD, even if the Mode property is UseSymbol. Similarly, CurrencyFormatter ("CAD", ["en"], "US") creates a formatter that formats 3 as 3 USD.

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.

Language tags support the Unicode extensions "ca-" and "nu-". (See Unicode Key/Type Definitions.) Note that these extensions can affect the numeral system used by CurrencyFormatter objects.

See also

Applies to