RegionInfo Class
Assembly: mscorlib (in mscorlib.dll)
'Declaration <SerializableAttribute> _ <ComVisibleAttribute(True)> _ Public Class RegionInfo 'Usage Dim instance As RegionInfo
/** @attribute SerializableAttribute() */ /** @attribute ComVisibleAttribute(true) */ public class RegionInfo
SerializableAttribute ComVisibleAttribute(true) public class RegionInfo
In contrast to CultureInfo, RegionInfo does not represent preferences of the user and does not depend on the user's language or culture.
The RegionInfo name is one of the two-letter codes defined in ISO 3166 for country/region. Case is not significant; however, the Name, the TwoLetterISORegionName, and the ThreeLetterISORegionName properties return the appropriate code in uppercase.
The following is a list of the predefined RegionInfo names accepted and used by this class and other classes in the System.Globalization namespace.
| ISO 3166 2-letter code | ISO 3166 3-letter code | Country/Region |
|---|---|---|
| AE | ARE | United Arab Emirates |
| AL | ALB | Albania |
| AM | ARM | Armenia |
| AR | ARG | Argentina |
| AT | AUT | Austria |
| AU | AUS | Australia |
| AZ | AZE | Azerbaijan |
| BE | BEL | Belgium |
| BG | BGR | Bulgaria |
| BH | BHR | Bahrain |
| BN | BRN | Brunei |
| BO | BOL | Bolivia |
| BR | BRA | Brazil |
| BY | BLR | Belarus |
| BZ | BLZ | Belize |
| CA | CAN | Canada |
| CB | CAR | Caribbean |
| CH | CHE | Switzerland |
| CL | CHL | Chile |
| CN | CHN | China |
| CO | COL | Colombia |
| CR | CRI | Costa Rica |
| CZ | CZE | Czech Republic |
| DE | DEU | Germany |
| DK | DNK | Denmark |
| DO | DOM | Dominican Republic |
| DZ | DZA | Algeria |
| EC | ECU | Ecuador |
| EE | EST | Estonia |
| EG | EGY | Egypt |
| ES | ESP | Spain |
| FI | FIN | Finland |
| FO | FRO | Faroe Islands |
| FR | FRA | France |
| GB | GBR | United Kingdom |
| GE | GEO | Georgia |
| GR | GRC | Greece |
| GT | GTM | Guatemala |
| HK | HKG | Hong Kong SAR |
| HN | HND | Honduras |
| HR | HRV | Croatia |
| HU | HUN | Hungary |
| ID | IDN | Indonesia |
| IE | IRL | Ireland |
| IL | ISR | Israel |
| IN | IND | India |
| IQ | IRQ | Iraq |
| IR | IRN | Iran |
| IS | ISL | Iceland |
| IT | ITA | Italy |
| JM | JAM | Jamaica |
| JO | JOR | Jordan |
| JP | JPN | Japan |
| KE | KEN | Kenya |
| KG | KGZ | Kyrgyzstan |
| KR | KOR | Korea |
| KW | KWT | Kuwait |
| KZ | KAZ | Kazakhstan |
| LB | LBN | Lebanon |
| LI | LIE | Liechtenstein |
| LT | LTU | Lithuania |
| LU | LUX | Luxembourg |
| LV | LVA | Latvia |
| LY | LBY | Libya |
| MA | MAR | Morocco |
| MC | MCO | Monaco |
| MK | MKD | FYROM |
| MN | MNG | Mongolia |
| MO | MAC | Macao SAR |
| MV | MDV | Maldives |
| MX | MEX | Mexico |
| MY | MYS | Malaysia |
| NI | NIC | Nicaragua |
| NL | NLD | The Netherlands |
| NO | NOR | Norway |
| NZ | NZL | New Zealand |
| OM | OMN | Oman |
| PA | PAN | Panama |
| PE | PER | Peru |
| PH | PHL | Philippines |
| PK | PAK | Pakistan |
| PL | POL | Poland |
| PR | PRI | Puerto Rico |
| PT | PRT | Portugal |
| PY | PRY | Paraguay |
| QA | QAT | Qatar |
| RO | ROM | Romania |
| RU | RUS | Russia |
| SA | SAU | Saudi Arabia |
| SE | SWE | Sweden |
| SG | SGP | Singapore |
| SI | SVN | Slovenia |
| SK | SVK | Slovakia |
| SP | SPB | Serbia |
| SV | SLV | El Salvador |
| SY | SYR | Syria |
| TA | TAT | Russia |
| TH | THA | Thailand |
| TN | TUN | Tunisia |
| TR | TUR | Turkey |
| TT | TTO | Trinidad and Tobago |
| TW | TWN | Taiwan |
| UA | UKR | Ukraine |
| US | USA | United States |
| UY | URY | Uruguay |
| UZ | UZB | Uzbekistan |
| VE | VEN | Venezuela |
| VN | VNM | Vietnam |
| YE | YEM | Yemen |
| ZA | ZAF | South Africa |
| ZW | ZWE | Zimbabwe |
The following is a list of the ISO 4217 currency symbols returned by the ISOCurrencySymbol property.
| Country/Region | Currency name | ISO 4217 currency symbol |
|---|---|---|
| United Arab Emirates | UAE Dirham | AED |
| Albania | Lek | ALL |
| Armenia | Armenian Dram | AMD |
| Argentina | Argentine Peso | ARS |
| Austria | Euro | EUR |
| Australia | Australian Dollar | AUD |
| Azerbaijan | Azerbaijanian Manat | AZM |
| Belgium | Euro | EUR |
| Bulgaria | Lev | BGL |
| Bahrain | Bahraini Dinar | BHD |
| Brunei | Brunei Dollar | BND |
| Bolivia | Boliviano | BOB |
| Brazil | Brazilian Real | BRL |
| Belarus | Belarussian Ruble | BYB |
| Belize | Belize Dollar | BZD |
| Canada | Canadian Dollar | CAD |
| Caribbean | US Dollar | USD |
| Switzerland | Swiss Franc | CHF |
| Chile | Chilean Peso | CLP |
| China | Yuan Renminbi | CNY |
| Colombia | Colombian Peso | COP |
| Costa Rica | Costa Rican Colon | CRC |
| Czech Republic | Czech Koruna | CZK |
| Germany | Euro | EUR |
| Denmark | Danish Krone | DKK |
| Dominican Republic | Dominican Peso | DOP |
| Algeria | Algerian Dinar | DZD |
| Ecuador | US Dollar | USD |
| Estonia | Kroon | EEK |
| Egypt | Egyptian Pound | EGP |
| Spain | Euro | EUR |
| Finland | Euro | EUR |
| Faroe Islands | Danish Krone | DKK |
| France | Euro | EUR |
| United Kingdom | Pound Sterling | GBP |
| Georgia | Lari | GEL |
| Greece | Euro | EUR |
| Guatemala | Quetzal | GTQ |
| Hong Kong SAR | Hong Kong Dollar | HKD |
| Honduras | Lempira | HNL |
| Croatia | Croatian kuna | HRK |
| FYROM | Denar | MKD |
| Hungary | Forint | HUF |
| Indonesia | Rupiah | IDR |
| Ireland | Euro | EUR |
| Israel | New Israeli Sheqel | ILS |
| India | Indian Rupee | INR |
| Iraq | Iraqi Dinar | IQD |
| Iran | Iranian Rial | IRR |
| Iceland | Iceland Krona | ISK |
| Italy | Euro | EUR |
| Jamaica | Jamaican Dollar | JMD |
| Jordan | Jordanian Dinar | JOD |
| Japan | Yen | JPY |
| Kenya | Kenyan Shilling | KES |
| Kyrgyzstan | Som | KGS |
| Korea | Won | KRW |
| Kuwait | Kuwaiti Dinar | KWD |
| Kazakhstan | Tenge | KZT |
| Lebanon | Lebanese Pound | LBP |
| Liechtenstein | Swiss Franc | CHF |
| Lithuania | Lithuanian Litus | LTL |
| Luxembourg | Euro | EUR |
| Latvia | Latvian Lats | LVL |
| Libya | Libyan Dinar | LYD |
| Morocco | Moroccan Dirham | MAD |
| Monaco | Euro | EUR |
| Mongolia | Tugrik | MNT |
| Macao SAR | Pataca | MOP |
| Maldives | Rufiyaa | MVR |
| Mexico | Mexican Peso | MXN |
| Malaysia | Malaysian Ringgit | MYR |
| Nicaragua | Cordoba Oro | NIO |
| The Netherlands | Euro | EUR |
| Norway | Norwegian Krone | NOK |
| New Zealand | New Zealand Dollar | NZD |
| Oman | Rial Omani | OMR |
| Panama | Balboa | PAB |
| Peru | Nuevo Sol | PEN |
| Philippines | Philippine Peso | PHP |
| Pakistan | Pakistan Rupee | PKR |
| Poland | Zloty | PLN |
| Puerto Rico | US Dollar | USD |
| Portugal | Euro | EUR |
| Paraguay | Guarani | PYG |
| Qatar | Qatari Rial | QAR |
| Romania | Leu | ROL |
| Russia | Russian Ruble | RUR |
| Saudi Arabia | Saudi Riyal | SAR |
| Sweden | Swedish Krona | SEK |
| Singapore | Singapore Dollar | SGD |
| Slovenia | Tolar | SIT |
| Slovakia | Slovak Koruna | SKK |
| Serbia | Yugoslavian New Dinar | YUN |
| El Salvador | US Dollar | USD |
| Syria | Syrian Pound | SYP |
| Thailand | Baht | THB |
| Tunisia | Tunisian Dinar | TND |
| Turkey | New Turkish Lira | YTL |
| Trinidad and Tobago | Trinidad and Tobago Dollar | TTD |
| Taiwan | New Taiwan Dollar | TWD |
| Ukraine | Hryvnia | UAH |
| United States | US Dollar | USD |
| Uruguay | Peso Uruguayo | UYU |
| Uzbekistan | Uzbekistan Sum | UZS |
| Venezuela | Bolivar | VEB |
| Vietnam | Dong | VND |
| Yemen | Yemeni Rial | YER |
| South Africa | Rand | ZAR |
| Zimbabwe | Zimbabwe Dollar | ZWD |
The following code example demonstrates several members of the RegionInfo class.
Imports System Imports System.Globalization Public Class SamplesRegionInfo Public Shared Sub Main() ' Displays the property values of the RegionInfo for "US". Dim myRI1 As New RegionInfo("US") Console.WriteLine(" Name: {0}", myRI1.Name) Console.WriteLine(" DisplayName: {0}", myRI1.DisplayName) Console.WriteLine(" EnglishName: {0}", myRI1.EnglishName) Console.WriteLine(" IsMetric: {0}", myRI1.IsMetric) Console.WriteLine(" ThreeLetterISORegionName: {0}", myRI1.ThreeLetterISORegionName) Console.WriteLine(" ThreeLetterWindowsRegionName: {0}", myRI1.ThreeLetterWindowsRegionName) Console.WriteLine(" TwoLetterISORegionName: {0}", myRI1.TwoLetterISORegionName) Console.WriteLine(" CurrencySymbol: {0}", myRI1.CurrencySymbol) Console.WriteLine(" ISOCurrencySymbol: {0}", myRI1.ISOCurrencySymbol) Console.WriteLine() ' Compares the RegionInfo above with another RegionInfo created using CultureInfo. Dim myRI2 As New RegionInfo(New CultureInfo("en-US", False).LCID) If myRI1.Equals(myRI2) Then Console.WriteLine("The two RegionInfo instances are equal.") Else Console.WriteLine("The two RegionInfo instances are NOT equal.") End If End Sub 'Main End Class 'SamplesRegionInfo 'This code produces the following output. ' ' Name: US ' DisplayName: United States ' EnglishName: United States ' IsMetric: False ' ThreeLetterISORegionName: USA ' ThreeLetterWindowsRegionName: USA ' TwoLetterISORegionName: US ' CurrencySymbol: $ ' ISOCurrencySymbol: USD ' 'The two RegionInfo instances are equal.
import System.*;
import System.Globalization.*;
public class SamplesRegionInfo
{
public static void main(String[] args)
{
// Displays the property values of the RegionInfo for "US".
RegionInfo myRI1 = new RegionInfo("US");
Console.WriteLine(" Name: {0}",
myRI1.get_Name());
Console.WriteLine(" DisplayName: {0}",
myRI1.get_DisplayName());
Console.WriteLine(" EnglishName: {0}",
myRI1.get_EnglishName());
Console.WriteLine(" IsMetric: {0}",
System.Convert.ToString( myRI1.get_IsMetric()));
Console.WriteLine(" ThreeLetterISORegionName: {0}",
myRI1.get_ThreeLetterISORegionName());
Console.WriteLine(" ThreeLetterWindowsRegionName: {0}",
myRI1.get_ThreeLetterWindowsRegionName());
Console.WriteLine(" TwoLetterISORegionName: {0}",
myRI1.get_TwoLetterISORegionName());
Console.WriteLine(" CurrencySymbol: {0}",
myRI1.get_CurrencySymbol());
Console.WriteLine(" ISOCurrencySymbol: {0}",
myRI1.get_ISOCurrencySymbol());
Console.WriteLine();
// Compares the RegionInfo above with another RegionInfo
// created using CultureInfo.
RegionInfo myRI2 =
new RegionInfo((new CultureInfo("en-US", false)).get_LCID());
if ( myRI1.Equals(myRI2)) {
Console.WriteLine("The two RegionInfo instances are equal.");
}
else {
Console.WriteLine("The two RegionInfo instances are NOT equal.");
}
} //main
} //SamplesRegionInfo
/*
This code produces the following output.
Name: US
DisplayName: United States
EnglishName: United States
IsMetric: False
ThreeLetterISORegionName: USA
ThreeLetterWindowsRegionName: USA
TwoLetterISORegionName: US
CurrencySymbol: $
ISOCurrencySymbol: USD
The two RegionInfo instances are equal.
*/
Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.