RegionInfo.ThreeLetterWindowsRegionName Propriété
Définition
Important
Certaines informations portent sur la préversion du produit qui est susceptible d’être en grande partie modifiée avant sa publication. Microsoft exclut toute garantie, expresse ou implicite, concernant les informations fournies ici.
Obtient le code à trois lettres affecté par Windows au pays/région représenté par cet élément RegionInfo.
public:
virtual property System::String ^ ThreeLetterWindowsRegionName { System::String ^ get(); };
public virtual string ThreeLetterWindowsRegionName { get; }
member this.ThreeLetterWindowsRegionName : string
Public Overridable ReadOnly Property ThreeLetterWindowsRegionName As String
Valeur de propriété
Code à trois lettres assigné par Windows au pays ou à la région représenté par RegionInfo.
Exemples
L’exemple de code suivant affiche les propriétés de la RegionInfo classe .
using namespace System;
using namespace System::Globalization;
int main()
{
// Displays the property values of the RegionInfo for "US".
RegionInfo^ myRI1 = gcnew RegionInfo( "US" );
Console::WriteLine( " Name: {0}", myRI1->Name );
Console::WriteLine( " DisplayName: {0}", myRI1->DisplayName );
Console::WriteLine( " EnglishName: {0}", myRI1->EnglishName );
Console::WriteLine( " IsMetric: {0}", myRI1->IsMetric );
Console::WriteLine( " ThreeLetterISORegionName: {0}", myRI1->ThreeLetterISORegionName );
Console::WriteLine( " ThreeLetterWindowsRegionName: {0}", myRI1->ThreeLetterWindowsRegionName );
Console::WriteLine( " TwoLetterISORegionName: {0}", myRI1->TwoLetterISORegionName );
Console::WriteLine( " CurrencySymbol: {0}", myRI1->CurrencySymbol );
Console::WriteLine( " ISOCurrencySymbol: {0}", myRI1->ISOCurrencySymbol );
}
/*
This code produces the following output.
Name: US
DisplayName: United States
EnglishName: United States
IsMetric: False
ThreeLetterISORegionName: USA
ThreeLetterWindowsRegionName: USA
TwoLetterISORegionName: US
CurrencySymbol: $
ISOCurrencySymbol: USD
*/
using System;
using System.Globalization;
public class SamplesRegionInfo {
public static void Main() {
// Displays the property values of the RegionInfo for "US".
RegionInfo myRI1 = new RegionInfo( "US" );
Console.WriteLine( " Name: {0}", myRI1.Name );
Console.WriteLine( " DisplayName: {0}", myRI1.DisplayName );
Console.WriteLine( " EnglishName: {0}", myRI1.EnglishName );
Console.WriteLine( " IsMetric: {0}", myRI1.IsMetric );
Console.WriteLine( " ThreeLetterISORegionName: {0}", myRI1.ThreeLetterISORegionName );
Console.WriteLine( " ThreeLetterWindowsRegionName: {0}", myRI1.ThreeLetterWindowsRegionName );
Console.WriteLine( " TwoLetterISORegionName: {0}", myRI1.TwoLetterISORegionName );
Console.WriteLine( " CurrencySymbol: {0}", myRI1.CurrencySymbol );
Console.WriteLine( " ISOCurrencySymbol: {0}", myRI1.ISOCurrencySymbol );
}
}
/*
This code produces the following output.
Name: US
DisplayName: United States
EnglishName: United States
IsMetric: False
ThreeLetterISORegionName: USA
ThreeLetterWindowsRegionName: USA
TwoLetterISORegionName: US
CurrencySymbol: $
ISOCurrencySymbol: USD
*/
Imports System.Globalization
Public Class SamplesRegionInfo
Public Shared Sub Main()
' Displays the property values of the RegionInfo for "US".
Dim myRI1 As New RegionInfo("US")
Console.WriteLine(" Name: {0}", myRI1.Name)
Console.WriteLine(" DisplayName: {0}", myRI1.DisplayName)
Console.WriteLine(" EnglishName: {0}", myRI1.EnglishName)
Console.WriteLine(" IsMetric: {0}", myRI1.IsMetric)
Console.WriteLine(" ThreeLetterISORegionName: {0}", myRI1.ThreeLetterISORegionName)
Console.WriteLine(" ThreeLetterWindowsRegionName: {0}", myRI1.ThreeLetterWindowsRegionName)
Console.WriteLine(" TwoLetterISORegionName: {0}", myRI1.TwoLetterISORegionName)
Console.WriteLine(" CurrencySymbol: {0}", myRI1.CurrencySymbol)
Console.WriteLine(" ISOCurrencySymbol: {0}", myRI1.ISOCurrencySymbol)
End Sub
End Class
'This code produces the following output.
'
' Name: US
' DisplayName: United States
' EnglishName: United States
' IsMetric: False
' ThreeLetterISORegionName: USA
' ThreeLetterWindowsRegionName: USA
' TwoLetterISORegionName: US
' CurrencySymbol: $
' ISOCurrencySymbol: USD
Remarques
Par exemple, le code à trois lettres pour États-Unis est « USA ».