mscorlib(4.0.0.0) API with additions
System.Globalization.RegionInfo Class Reference

Contains information about the country/region. More...

Public Member Functions

 RegionInfo (string name)
 Initializes a new instance of the T:System.Globalization.RegionInfo class based on the country/region or specific culture, specified by name. More...
 
 RegionInfo (int culture)
 Initializes a new instance of the T:System.Globalization.RegionInfo class based on the country/region associated with the specified culture identifier. More...
 
override bool Equals (object value)
 Determines whether the specified object is the same instance as the current T:System.Globalization.RegionInfo. More...
 
override int GetHashCode ()
 Serves as a hash function for the current T:System.Globalization.RegionInfo, suitable for hashing algorithms and data structures, such as a hash table. More...
 
override string ToString ()
 Returns a string containing the culture name or ISO 3166 two-letter country/region codes specified for the current T:System.Globalization.RegionInfo. More...
 

Properties

static RegionInfo CurrentRegion [get]
 Gets the T:System.Globalization.RegionInfo that represents the country/region used by the current thread. More...
 
virtual string Name [get]
 Gets the name or ISO 3166 two-letter country/region code for the current T:System.Globalization.RegionInfo object. More...
 
virtual string EnglishName [get]
 Gets the full name of the country/region in English. More...
 
virtual string DisplayName [get]
 Gets the full name of the country/region in the language of the localized version of .NET Framework. More...
 
virtual string NativeName [get]
 Gets the name of a country/region formatted in the native language of the country/region. More...
 
virtual string TwoLetterISORegionName [get]
 Gets the two-letter code defined in ISO 3166 for the country/region. More...
 
virtual string ThreeLetterISORegionName [get]
 Gets the three-letter code defined in ISO 3166 for the country/region. More...
 
virtual string ThreeLetterWindowsRegionName [get]
 Gets the three-letter code assigned by Windows to the country/region represented by this T:System.Globalization.RegionInfo. More...
 
virtual bool IsMetric [get]
 Gets a value indicating whether the country/region uses the metric system for measurements. More...
 
virtual int GeoId [get]
 Gets a unique identification number for a geographical region, country, city, or location. More...
 
virtual string CurrencyEnglishName [get]
 Gets the name, in English, of the currency used in the country/region. More...
 
virtual string CurrencyNativeName [get]
 Gets the name of the currency used in the country/region, formatted in the native language of the country/region. More...
 
virtual string CurrencySymbol [get]
 Gets the currency symbol associated with the country/region. More...
 
virtual string ISOCurrencySymbol [get]
 Gets the three-character ISO 4217 currency symbol associated with the country/region. More...
 

Detailed Description

Contains information about the country/region.

Definition at line 11 of file RegionInfo.cs.

Constructor & Destructor Documentation

◆ RegionInfo() [1/2]

System.Globalization.RegionInfo.RegionInfo ( string  name)

Initializes a new instance of the T:System.Globalization.RegionInfo class based on the country/region or specific culture, specified by name.

Parameters
nameA string that contains a two-letter code defined in ISO 3166 for country/region.-or-A string that contains the culture name for a specific culture, custom culture, or Windows-only culture. If the culture name is not in RFC 4646 format, your application should specify the entire culture name instead of just the country/region.
Exceptions
T:System.ArgumentNullExceptionname is null.
T:System.ArgumentExceptionname is not a valid country/region name or specific culture name.

Definition at line 330 of file RegionInfo.cs.

◆ RegionInfo() [2/2]

System.Globalization.RegionInfo.RegionInfo ( int  culture)

Initializes a new instance of the T:System.Globalization.RegionInfo class based on the country/region associated with the specified culture identifier.

Parameters
cultureA culture identifier.
Exceptions
T:System.ArgumentExceptionculture specifies either an invariant, custom, or neutral culture.

Definition at line 357 of file RegionInfo.cs.

Member Function Documentation

◆ Equals()

override bool System.Globalization.RegionInfo.Equals ( object  value)

Determines whether the specified object is the same instance as the current T:System.Globalization.RegionInfo.

Parameters
valueThe object to compare with the current T:System.Globalization.RegionInfo.
Returns
true if the value parameter is a T:System.Globalization.RegionInfo object and its P:System.Globalization.RegionInfo.Name property is the same as the P:System.Globalization.RegionInfo.Name property of the current T:System.Globalization.RegionInfo object; otherwise, false.

Definition at line 430 of file RegionInfo.cs.

◆ GetHashCode()

override int System.Globalization.RegionInfo.GetHashCode ( )

Serves as a hash function for the current T:System.Globalization.RegionInfo, suitable for hashing algorithms and data structures, such as a hash table.

Returns
A hash code for the current T:System.Globalization.RegionInfo.

Definition at line 443 of file RegionInfo.cs.

◆ ToString()

override string System.Globalization.RegionInfo.ToString ( )

Returns a string containing the culture name or ISO 3166 two-letter country/region codes specified for the current T:System.Globalization.RegionInfo.

Returns
A string containing the culture name or ISO 3166 two-letter country/region codes defined for the current T:System.Globalization.RegionInfo.

Definition at line 451 of file RegionInfo.cs.

Property Documentation

◆ CurrencyEnglishName

virtual string System.Globalization.RegionInfo.CurrencyEnglishName
get

Gets the name, in English, of the currency used in the country/region.

Returns
The name, in English, of the currency used in the country/region.

Definition at line 276 of file RegionInfo.cs.

◆ CurrencyNativeName

virtual string System.Globalization.RegionInfo.CurrencyNativeName
get

Gets the name of the currency used in the country/region, formatted in the native language of the country/region.

Returns
The native name of the currency used in the country/region, formatted in the language associated with the ISO 3166 country/region code.

Definition at line 288 of file RegionInfo.cs.

◆ CurrencySymbol

virtual string System.Globalization.RegionInfo.CurrencySymbol
get

Gets the currency symbol associated with the country/region.

Returns
The currency symbol associated with the country/region.

Definition at line 300 of file RegionInfo.cs.

◆ CurrentRegion

RegionInfo System.Globalization.RegionInfo.CurrentRegion
staticget

Gets the T:System.Globalization.RegionInfo that represents the country/region used by the current thread.

Returns
The T:System.Globalization.RegionInfo that represents the country/region used by the current thread.

Definition at line 144 of file RegionInfo.cs.

◆ DisplayName

virtual string System.Globalization.RegionInfo.DisplayName
get

Gets the full name of the country/region in the language of the localized version of .NET Framework.

Returns
The full name of the country/region in the language of the localized version of .NET Framework.

Definition at line 189 of file RegionInfo.cs.

◆ EnglishName

virtual string System.Globalization.RegionInfo.EnglishName
get

Gets the full name of the country/region in English.

Returns
The full name of the country/region in English.

Definition at line 176 of file RegionInfo.cs.

◆ GeoId

virtual int System.Globalization.RegionInfo.GeoId
get

Gets a unique identification number for a geographical region, country, city, or location.

Returns
A 32-bit signed number that uniquely identifies a geographical location.

Definition at line 265 of file RegionInfo.cs.

◆ IsMetric

virtual bool System.Globalization.RegionInfo.IsMetric
get

Gets a value indicating whether the country/region uses the metric system for measurements.

Returns
true if the country/region uses the metric system for measurements; otherwise, false.

Definition at line 252 of file RegionInfo.cs.

◆ ISOCurrencySymbol

virtual string System.Globalization.RegionInfo.ISOCurrencySymbol
get

Gets the three-character ISO 4217 currency symbol associated with the country/region.

Returns
The three-character ISO 4217 currency symbol associated with the country/region.

Definition at line 313 of file RegionInfo.cs.

◆ Name

virtual string System.Globalization.RegionInfo.Name
get

Gets the name or ISO 3166 two-letter country/region code for the current T:System.Globalization.RegionInfo object.

Returns
The value specified by the name parameter of the M:System.Globalization.RegionInfo.::ctor(System.String) constructor. The return value is in uppercase.-or-The two-letter code defined in ISO 3166 for the country/region specified by the culture parameter of the M:System.Globalization.RegionInfo.::ctor(System.Int32) constructor. The return value is in uppercase.

Definition at line 164 of file RegionInfo.cs.

◆ NativeName

virtual string System.Globalization.RegionInfo.NativeName
get

Gets the name of a country/region formatted in the native language of the country/region.

Returns
The native name of the country/region formatted in the language associated with the ISO 3166 country/region code.

Definition at line 203 of file RegionInfo.cs.

◆ ThreeLetterISORegionName

virtual string System.Globalization.RegionInfo.ThreeLetterISORegionName
get

Gets the three-letter code defined in ISO 3166 for the country/region.

Returns
The three-letter code defined in ISO 3166 for the country/region.

Definition at line 228 of file RegionInfo.cs.

◆ ThreeLetterWindowsRegionName

virtual string System.Globalization.RegionInfo.ThreeLetterWindowsRegionName
get

Gets the three-letter code assigned by Windows to the country/region represented by this T:System.Globalization.RegionInfo.

Returns
The three-letter code assigned by Windows to the country/region represented by this T:System.Globalization.RegionInfo.

Definition at line 239 of file RegionInfo.cs.

◆ TwoLetterISORegionName

virtual string System.Globalization.RegionInfo.TwoLetterISORegionName
get

Gets the two-letter code defined in ISO 3166 for the country/region.

Returns
The two-letter code defined in ISO 3166 for the country/region.

Definition at line 216 of file RegionInfo.cs.


The documentation for this class was generated from the following file: