Class StatisticalRegionExtensions
- Namespace
- Cuemon.Extensions.Globalization
- Assembly
- Cuemon.Extensions.Core.dll
Provides extension methods for StatisticalRegionInfo.
public static class StatisticalRegionExtensions
- Inheritance
-
StatisticalRegionExtensions
Methods
HasIsoCodes(StatisticalRegionInfo)
Determines whether the specified country has ISO code information available.
public static bool HasIsoCodes(this StatisticalRegionInfo region)
Parameters
regionStatisticalRegionInfoThe region to check.
Returns
- bool
trueif the region is a country and has ISO codes; otherwise,false.
Exceptions
- ArgumentNullException
regionisnull.
HasRegionInfo(StatisticalRegionInfo)
Determines whether the specified country has a .NET RegionInfo available.
public static bool HasRegionInfo(this StatisticalRegionInfo region)
Parameters
regionStatisticalRegionInfoThe region to check.
Returns
- bool
trueif the region is a country and has OS-level RegionInfo support; otherwise,false.
Exceptions
- ArgumentNullException
regionisnull.
IsArea(StatisticalRegionInfo)
Determines whether the specified region is a geographic area (not a country).
public static bool IsArea(this StatisticalRegionInfo region)
Parameters
regionStatisticalRegionInfoThe region to check.
Returns
- bool
trueif the region is not a CountryOrTerritory; otherwise,false.
Exceptions
- ArgumentNullException
regionisnull.
IsCountryOrTerritory(StatisticalRegionInfo)
Determines whether the specified region is a country or territory.
public static bool IsCountryOrTerritory(this StatisticalRegionInfo region)
Parameters
regionStatisticalRegionInfoThe region to check.
Returns
- bool
trueif the region is a CountryOrTerritory; otherwise,false.
Exceptions
- ArgumentNullException
regionisnull.
IsIntermediateRegion(StatisticalRegionInfo)
Determines whether the specified region is an intermediate region.
public static bool IsIntermediateRegion(this StatisticalRegionInfo region)
Parameters
regionStatisticalRegionInfoThe region to check.
Returns
- bool
trueif the region is an IntermediateRegion; otherwise,false.
Exceptions
- ArgumentNullException
regionisnull.
IsRegion(StatisticalRegionInfo)
Determines whether the specified region is a geographic region (continent or major area).
public static bool IsRegion(this StatisticalRegionInfo region)
Parameters
regionStatisticalRegionInfoThe region to check.
Returns
- bool
trueif the region is a Region; otherwise,false.
Exceptions
- ArgumentNullException
regionisnull.
IsSubregion(StatisticalRegionInfo)
Determines whether the specified region is a subregion.
public static bool IsSubregion(this StatisticalRegionInfo region)
Parameters
regionStatisticalRegionInfoThe region to check.
Returns
- bool
trueif the region is a Subregion; otherwise,false.
Exceptions
- ArgumentNullException
regionisnull.
IsWorld(StatisticalRegionInfo)
Determines whether the specified region is the World region.
public static bool IsWorld(this StatisticalRegionInfo region)
Parameters
regionStatisticalRegionInfoThe region to check.
Returns
- bool
trueif the region is the World region; otherwise,false.
Exceptions
- ArgumentNullException
regionisnull.