RegionInfo.ThreeLetterWindowsRegionName Properti
Definisi
Penting
Beberapa informasi terkait produk prarilis yang dapat diubah secara signifikan sebelum dirilis. Microsoft tidak memberikan jaminan, tersirat maupun tersurat, sehubungan dengan informasi yang diberikan di sini.
Mendapatkan kode tiga huruf yang ditetapkan oleh Windows ke negara/wilayah yang diwakili oleh ini 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
Nilai Properti
Kode tiga huruf yang ditetapkan oleh Windows ke negara/wilayah yang diwakili oleh ini RegionInfo.
Contoh
Contoh kode berikut menampilkan properti RegionInfo kelas .
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
Keterangan
Misalnya, kode tiga huruf untuk Amerika Serikat adalah "AS".
Berlaku untuk
Lihat juga
Berkolaborasi dengan kami di GitHub
Sumber untuk konten ini dapat ditemukan di GitHub, yang juga dapat Anda gunakan untuk membuat dan meninjau masalah dan menarik permintaan. Untuk informasi selengkapnya, lihat panduan kontributor kami.