Walter.BOM
GetCountryName(Nullable<GeoLocation>) Method
Walter.BOM Assembly > Walter.BOM.Geo Namespace > GeoExtensionMethods Class > GetCountryName Method : GetCountryName(Nullable<GeoLocation>) Method
The geographic location enum value for which to obtain the country name. Can be null.
Retrieves the en-US name of the country associated with the specified GeoLocation value.
Syntax
public static string GetCountryName( 
   Nullable<GeoLocation> location
)

Parameters

location
The geographic location enum value for which to obtain the country name. Can be null.

Return Value

A string containing the en-US country name corresponding to the provided location. Returns "UnKnown" if the location is null or does not correspond to a known country.
Remarks
This method is particularly useful for applications requiring the display of country names in the English language, regardless of the user's current culture settings. It translates the GeoLocation enum values into their readable country names in English, facilitating easier identification and presentation of geographic information. This is distinct from the "ToString" method of the enum, which returns the enum's identifier name rather than the user-friendly country name.
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

GeoExtensionMethods Class
GeoExtensionMethods Members
Overload List