10 [__DynamicallyInvokable]
13 internal string m_name;
16 internal CultureData m_cultureData;
18 internal static volatile RegionInfo s_currentRegionInfo;
20 [OptionalField(VersionAdded = 2)]
21 private int m_cultureId;
23 [OptionalField(VersionAdded = 2)]
24 internal int m_dataItem;
26 private static readonly
int[] IdFromEverettRegionInfoDataItem =
new int[110]
142 [__DynamicallyInvokable]
145 [SecuritySafeCritical]
146 [__DynamicallyInvokable]
150 if (regionInfo ==
null)
153 regionInfo.m_name = regionInfo.m_cultureData.SREGIONNAME;
154 s_currentRegionInfo = regionInfo;
162 [__DynamicallyInvokable]
163 public virtual string Name 165 [__DynamicallyInvokable]
174 [__DynamicallyInvokable]
177 [SecuritySafeCritical]
178 [__DynamicallyInvokable]
181 return m_cultureData.SENGCOUNTRY;
187 [__DynamicallyInvokable]
190 [SecuritySafeCritical]
191 [__DynamicallyInvokable]
194 return m_cultureData.SLOCALIZEDCOUNTRY;
201 [__DynamicallyInvokable]
204 [SecuritySafeCritical]
205 [__DynamicallyInvokable]
208 return m_cultureData.SNATIVECOUNTRY;
214 [__DynamicallyInvokable]
217 [SecuritySafeCritical]
218 [__DynamicallyInvokable]
221 return m_cultureData.SISO3166CTRYNAME;
229 [SecuritySafeCritical]
232 return m_cultureData.SISO3166CTRYNAME2;
240 [SecuritySafeCritical]
243 return m_cultureData.SABBREVCTRYNAME;
250 [__DynamicallyInvokable]
253 [__DynamicallyInvokable]
256 int iMEASURE = m_cultureData.IMEASURE;
257 return iMEASURE == 0;
264 public virtual int GeoId 268 return m_cultureData.IGEOID;
277 [SecuritySafeCritical]
280 return m_cultureData.SENGLISHCURRENCY;
289 [SecuritySafeCritical]
292 return m_cultureData.SNATIVECURRENCY;
298 [__DynamicallyInvokable]
301 [SecuritySafeCritical]
302 [__DynamicallyInvokable]
305 return m_cultureData.SCURRENCY;
311 [__DynamicallyInvokable]
314 [SecuritySafeCritical]
315 [__DynamicallyInvokable]
318 return m_cultureData.SINTLSYMBOL;
328 [SecuritySafeCritical]
329 [__DynamicallyInvokable]
336 if (name.Length == 0)
340 m_cultureData = CultureData.GetCultureDataForRegion(name, useUserOverride:
true);
341 if (m_cultureData ==
null)
345 if (m_cultureData.IsNeutralCulture)
356 [SecuritySafeCritical]
368 m_cultureData = CultureData.GetCultureData(culture, bUseUserOverride:
true);
369 m_name = m_cultureData.SREGIONNAME;
370 if (m_cultureData.IsNeutralCulture)
374 m_cultureId = culture;
377 [SecuritySafeCritical]
380 m_cultureData = cultureData;
381 m_name = m_cultureData.SREGIONNAME;
385 private void SetName(
string name)
387 m_name = (name.Equals(m_cultureData.SREGIONNAME,
StringComparison.OrdinalIgnoreCase) ? m_cultureData.SREGIONNAME : m_cultureData.CultureName);
396 m_cultureId = IdFromEverettRegionInfoDataItem[m_dataItem];
398 if (m_cultureId == 0)
400 m_cultureData = CultureData.GetCultureDataForRegion(m_name, useUserOverride:
true);
404 m_cultureData = CultureData.GetCultureData(m_cultureId, bUseUserOverride:
true);
406 if (m_cultureData ==
null)
408 throw new ArgumentException(
string.
Format(CultureInfo.CurrentCulture, Environment.GetResourceString(
"Argument_InvalidCultureName"), m_name),
"m_name");
410 if (m_cultureId == 0)
416 m_name = m_cultureData.SREGIONNAME;
429 [__DynamicallyInvokable]
430 public override bool Equals(
object value)
433 if (regionInfo !=
null)
435 return Name.Equals(regionInfo.
Name);
442 [__DynamicallyInvokable]
445 return Name.GetHashCode();
450 [__DynamicallyInvokable]
virtual string CurrencySymbol
Gets the currency symbol associated with the country/region.
RegionInfo(string name)
Initializes a new instance of the T:System.Globalization.RegionInfo class based on the country/region...
The exception that is thrown when a null reference (Nothing in Visual Basic) is passed to a method th...
virtual string ISOCurrencySymbol
Gets the three-character ISO 4217 currency symbol associated with the country/region.
virtual string NativeName
Gets the name of a country/region formatted in the native language of the country/region.
StringComparison
Specifies the culture, case, and sort rules to be used by certain overloads of the M:System....
virtual string ThreeLetterWindowsRegionName
Gets the three-letter code assigned by Windows to the country/region represented by this T:System....
override int GetHashCode()
Serves as a hash function for the current T:System.Globalization.RegionInfo, suitable for hashing alg...
virtual int GeoId
Gets a unique identification number for a geographical region, country, city, or location.
Describes the source and destination of a given serialized stream, and provides an additional caller-...
Contains information about the country/region.
Provides information about, and means to manipulate, the current environment and platform....
virtual string EnglishName
Gets the full name of the country/region in English.
override string ToString()
Returns a string containing the culture name or ISO 3166 two-letter country/region codes specified fo...
static RegionInfo CurrentRegion
Gets the T:System.Globalization.RegionInfo that represents the country/region used by the current thr...
Format character that affects the layout of text or the operation of text processes,...
virtual string CurrencyEnglishName
Gets the name, in English, of the currency used in the country/region.
virtual string CurrencyNativeName
Gets the name of the currency used in the country/region, formatted in the native language of the cou...
override bool Equals(object value)
Determines whether the specified object is the same instance as the current T:System....
static CultureInfo CurrentCulture
Gets or sets the T:System.Globalization.CultureInfo object that represents the culture used by the cu...
The exception that is thrown when one of the arguments provided to a method is not valid.
RegionInfo(int culture)
Initializes a new instance of the T:System.Globalization.RegionInfo class based on the country/region...
Specifies that the class can be serialized.
virtual string ThreeLetterISORegionName
Gets the three-letter code defined in ISO 3166 for the country/region.
virtual string DisplayName
Gets the full name of the country/region in the language of the localized version of ....
Provides information about a specific culture (called a locale for unmanaged code development)....
virtual string TwoLetterISORegionName
Gets the two-letter code defined in ISO 3166 for the country/region.
virtual bool IsMetric
Gets a value indicating whether the country/region uses the metric system for measurements.
virtual string Name
Gets the name or ISO 3166 two-letter country/region code for the current T:System....