GeographicRegion Klasse

Definition

Beschreibt eine Region. Dies ist in der Regel ein Land, kann aber eine Makroregion sein.

public ref class GeographicRegion sealed
/// [Windows.Foundation.Metadata.Activatable(Windows.Globalization.IGeographicRegionFactory, 65536, Windows.Foundation.UniversalApiContract)]
/// [Windows.Foundation.Metadata.Activatable(65536, Windows.Foundation.UniversalApiContract)]
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class GeographicRegion final
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
/// [Windows.Foundation.Metadata.Activatable(65536, "Windows.Foundation.UniversalApiContract")]
/// [Windows.Foundation.Metadata.Activatable(Windows.Globalization.IGeographicRegionFactory, 65536, "Windows.Foundation.UniversalApiContract")]
class GeographicRegion final
[Windows.Foundation.Metadata.Activatable(typeof(Windows.Globalization.IGeographicRegionFactory), 65536, typeof(Windows.Foundation.UniversalApiContract))]
[Windows.Foundation.Metadata.Activatable(65536, typeof(Windows.Foundation.UniversalApiContract))]
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public sealed class GeographicRegion
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
[Windows.Foundation.Metadata.Activatable(65536, "Windows.Foundation.UniversalApiContract")]
[Windows.Foundation.Metadata.Activatable(typeof(Windows.Globalization.IGeographicRegionFactory), 65536, "Windows.Foundation.UniversalApiContract")]
public sealed class GeographicRegion
function GeographicRegion(geographicRegionCode)
Public NotInheritable Class GeographicRegion
Vererbung
Object Platform::Object IInspectable GeographicRegion
Attribute

Windows-Anforderungen

Gerätefamilie
Windows 10 (eingeführt in 10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (eingeführt in v1.0)

Beispiele

// Get the user's geographic region and its display name.
var geographicRegion = new Windows.Globalization.GeographicRegion();
var displayName = geographicRegion.DisplayName;

Hinweise

Eine Liste der von Microsoft verwendeten Standard-Länder-/Regionscodes finden Sie in der Offiziellen Länder-/Regionsliste.

Konstruktoren

GeographicRegion()

Erstellt ein GeographicRegion-Objekt , das standardmäßig auf die Heimatregion des Benutzers festgelegt ist.

GeographicRegion(String)

Erstellt ein GeographicRegion-Objekt .

Eigenschaften

Code

Ruft die Zeichenfolge ab, die den besten verfügbaren Bezeichner enthält, der die Region darstellt.

CodeThreeDigit

Ruft den dreistelligen Bezeichner für diese Region als Zeichenfolge ab.

CodeThreeLetter

Ruft den Bezeichner aus drei Buchstaben für diese Region ab.

CodeTwoLetter

Ruft den Zweibuchstabenbezeichner für diese Region ab.

CurrenciesInUse

Ruft den Satz von Währungen ab, die in dieser Region verwendet werden.

DisplayName

Ruft eine lokalisierte Zeichenfolge ab, die für die Anzeige für den Benutzer zum Identifizieren der Region geeignet ist.

NativeName

Ruft den Namen der Region in der primären Sprache ab, die in dieser Region gesprochen wird.

Methoden

IsSupported(String)

Bestimmt, ob ein geografischer Regionsbezeichner unterstützt wird.

Gilt für:

Weitere Informationen