CurrencyFormatter 构造函数
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
重载
CurrencyFormatter(String) |
创建使用货币标识符初始化的 CurrencyFormatter 对象。 |
CurrencyFormatter(String, IIterable<String>, String) |
创建使用货币标识符、语言列表和地理区域初始化的 CurrencyFormatter 对象。 |
CurrencyFormatter(String)
创建使用货币标识符初始化的 CurrencyFormatter 对象。
public:
CurrencyFormatter(Platform::String ^ currencyCode);
CurrencyFormatter(winrt::hstring const& currencyCode);
public CurrencyFormatter(string currencyCode);
function CurrencyFormatter(currencyCode)
Public Sub New (currencyCode As String)
参数
- currencyCode
-
String
Platform::String
winrt::hstring
格式化和分析货币值时要使用的货币标识符。
另请参阅
适用于
CurrencyFormatter(String, IIterable<String>, String)
创建使用货币标识符、语言列表和地理区域初始化的 CurrencyFormatter 对象。
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)
参数
- currencyCode
-
String
Platform::String
winrt::hstring
格式化和分析货币值时要使用的货币标识符。
- geographicRegion
-
String
Platform::String
winrt::hstring
地理区域的标识符。
注解
如果提供的货币的符号与所提供区域 (或主区域中不同货币的符号相同(如果没有提供) ),则即使 Mode 属性为 UseSymbol,格式设置也可能使用货币代码。 这是为了避免歧义。 例如,CurrencyFormatter (“USD”, [“en”], “CA”) 会创建一个格式化程序,该格式化程序将 3 格式设置为 3 CAD,即使 Mode 属性为 UseSymbol 也是如此。 同样,CurrencyFormatter (“CAD”,[“en”],“US”) 创建一个格式化程序,其格式为 3 美元。
如果你的应用将此类中使用的语言标记传递给任何 国家语言支持 函数,它必须首先通过调用 ResolveLocaleName 来转换标记。
语言标记支持 Unicode 扩展“ca-”和“nu-”。 (请参阅 Unicode 键/类型定义。) 请注意,这些扩展可能会影响 CurrencyFormatter 对象使用的数字系统。