Currency.GetInstance Method
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.
Overloads
GetInstance(Locale) |
Returns the |
GetInstance(String) |
Returns the |
GetInstance(Locale)
Returns the Currency
instance for the country of the
given locale.
[Android.Runtime.Register("getInstance", "(Ljava/util/Locale;)Ljava/util/Currency;", "")]
public static Java.Util.Currency? GetInstance (Java.Util.Locale? locale);
[<Android.Runtime.Register("getInstance", "(Ljava/util/Locale;)Ljava/util/Currency;", "")>]
static member GetInstance : Java.Util.Locale -> Java.Util.Currency
Parameters
- locale
- Locale
the locale for whose country a Currency
instance is needed
Returns
the Currency
instance for the country of the given
locale, or null
- Attributes
Exceptions
if the locale's country is not a supported ISO 3166 country.
Remarks
Returns the Currency
instance for the country of the given locale. The language and variant components of the locale are ignored. The result may vary over time, as countries change their currencies. For example, for the original member countries of the European Monetary Union, the method returns the old national currencies until December 31, 2001, and the Euro from January 1, 2002, local time of the respective countries.
If the specified locale
contains "cu" Unicode extensions, the instance returned from this method reflects the values specified with those extensions.
The method returns null
for territories that don't have a currency, such as Antarctica.
Java documentation for java.util.Currency.getInstance(java.util.Locale)
.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
Applies to
GetInstance(String)
Returns the Currency
instance for the given currency code.
[Android.Runtime.Register("getInstance", "(Ljava/lang/String;)Ljava/util/Currency;", "")]
public static Java.Util.Currency? GetInstance (string? currencyCode);
[<Android.Runtime.Register("getInstance", "(Ljava/lang/String;)Ljava/util/Currency;", "")>]
static member GetInstance : string -> Java.Util.Currency
Parameters
- currencyCode
- String
the ISO 4217 code of the currency
Returns
the Currency
instance for the given currency code
- Attributes
Exceptions
if the currency code is not a supported ISO 4217 currency code.
Remarks
Returns the Currency
instance for the given currency code.
Java documentation for java.util.Currency.getInstance(java.lang.String)
.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.