Class World
- Namespace
- Cuemon.Globalization
- Assembly
- Cuemon.Core.dll
This static class is designed to make System.Globalization operations easier to work with.
public static class World
- Inheritance
-
World
Properties
Regions
Gets the by .NET specific regions of the world.
public static IEnumerable<RegionInfo> Regions { get; }
Property Value
- IEnumerable<RegionInfo>
The .NET specific regions of the world.
StatisticalRegions
Gets all UN M.49 geographic regions.
public static IEnumerable<StatisticalRegionInfo> StatisticalRegions { get; }
Property Value
- IEnumerable<StatisticalRegionInfo>
A sequence of all StatisticalRegionInfo instances.
Remarks
The sequence includes the World region (code "001") and all geographic regions.
Methods
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.
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.
GetCultures(RegionInfo)
Resolves a sequence of related CultureInfo objects for the specified region.
public static IEnumerable<CultureInfo> GetCultures(RegionInfo region)
Parameters
regionRegionInfoThe region to resolve a sequence of CultureInfo objects from.
Returns
- IEnumerable<CultureInfo>
An IEnumerable<T> sequence of CultureInfo objects.
GetStatisticalRegion(string)
Gets a region or country by its UN M.49 code.
public static StatisticalRegionInfo GetStatisticalRegion(string code)
Parameters
codestringThe three-digit UN M.49 code (e.g., "001" for World, "840" for United States).
Returns
- StatisticalRegionInfo
A StatisticalRegionInfo instance, or
nullif the code is not found.