Partage via


GeographicRegion Classe

Définition

Décrit une région. Il s’agit généralement d’un pays, mais il peut s’agir d’une macrorégion.

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
Héritage
Object Platform::Object IInspectable GeographicRegion
Attributs

Configuration requise pour Windows

Famille d’appareils
Windows 10 (introduit dans 10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduit dans v1.0)

Exemples

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

Remarques

Pour obtenir la liste des codes pays/régions standard utilisés par Microsoft, consultez la Liste officielle des pays/régions.

Constructeurs

GeographicRegion()

Crée un objet GeographicRegion qui correspond par défaut à la région d’accueil de l’utilisateur.

GeographicRegion(String)

Crée un objet GeographicRegion .

Propriétés

Code

Obtient la chaîne qui contient le meilleur identificateur disponible qui représente la région.

CodeThreeDigit

Obtient l’identificateur à trois chiffres pour cette région, sous forme de chaîne.

CodeThreeLetter

Obtient l’identificateur de trois lettres pour cette région.

CodeTwoLetter

Obtient l’identificateur à deux lettres pour cette région.

CurrenciesInUse

Obtient l’ensemble de devises en cours d’utilisation dans cette région.

DisplayName

Obtient une chaîne localisée qui convient à l’affichage pour l’utilisateur pour l’identification de la région.

NativeName

Obtient le nom de la région dans la langue principale parlée dans cette région.

Méthodes

IsSupported(String)

Détermine si un identificateur de région géographique est pris en charge.

S’applique à

Voir aussi