Dela via


GeographicRegion.IsSupported(String) Method

Definition

Determines whether a geographic region identifier is supported.

public:
 static bool IsSupported(Platform::String ^ geographicRegionCode);
 static bool IsSupported(winrt::hstring const& geographicRegionCode);
public static bool IsSupported(string geographicRegionCode);
function isSupported(geographicRegionCode)
Public Shared Function IsSupported (geographicRegionCode As String) As Boolean

Parameters

geographicRegionCode
String

Platform::String

winrt::hstring

One of the ISO 3166-1 two-letter or three-letter codes that identify the country, or one of the three-digit UN-M49 codes that identify the geographical region.

Returns

Boolean

bool

True if the ID is known; otherwise, ** false**. If this method returns true, an app can safely construct a region by using this region identifier. If it returns false, attempting to construct a region for the given code will throw an exception.

Applies to