GetCountry Method
Definition
- Namespace
- Cuemon.Globalization
- Assemblies
- Cuemon.Core.dll
GetCountry(string)
Gets a country by its UN M.49 code.
public static StatisticalRegionInfo GetCountry(string m49Code)
Parameters
m49CodestringThe three-digit UN M.49 country code (e.g., "840" for United States).
Returns
- StatisticalRegionInfo
A StatisticalRegionInfo instance with CountryOrTerritory, or
nullif the code is not found.
GetCountry(RegionInfo)
Gets the UN M.49 country information for the specified RegionInfo.
public static StatisticalRegionInfo GetCountry(RegionInfo region)
Parameters
regionRegionInfoThe .NET region information.
Returns
- StatisticalRegionInfo
A StatisticalRegionInfo instance, or
nullif no mapping exists.
Exceptions
- ArgumentNullException
regionisnull.