RegionInfo.GeoId 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 nomor identifikasi unik untuk wilayah geografis, negara, kota, atau lokasi.
public:
virtual property int GeoId { int get(); };
public virtual int GeoId { get; }
[System.Runtime.InteropServices.ComVisible(false)]
public virtual int GeoId { get; }
member this.GeoId : int
[<System.Runtime.InteropServices.ComVisible(false)>]
member this.GeoId : int
Public Overridable ReadOnly Property GeoId As Integer
Nilai Properti
Nomor bertanda tangan 32-bit yang secara unik mengidentifikasi lokasi geografis.
- Atribut
Contoh
Contoh kode berikut menunjukkan GeoId properti .
// This example demonstrates the RegionInfo.EnglishName, NativeName,
// CurrencyEnglishName, CurrencyNativeName, and GeoId properties.
using namespace System;
using namespace System::Globalization;
int main()
{
// Regional Info for Sweden
RegionInfo^ ri = gcnew RegionInfo("SE");
Console::WriteLine("Region English Name: . . . {0}", ri->EnglishName);
Console::WriteLine("Native Name: . . . . . . . {0}", ri->NativeName);
Console::WriteLine("Currency English Name: . . {0}",
ri->CurrencyEnglishName);
Console::WriteLine("Currency Native Name:. . . {0}",
ri->CurrencyNativeName);
Console::WriteLine("Geographical ID: . . . . . {0}", ri->GeoId);
}
/*
This code example produces the following results:
Region English Name: . . . Sweden
Native Name: . . . . . . . Sverige
Currency English Name: . . Swedish Krona
Currency Native Name:. . . Svensk krona
Geographical ID: . . . . . 221
*/
// This example demonstrates the RegionInfo.EnglishName, NativeName,
// CurrencyEnglishName, CurrencyNativeName, and GeoId properties.
using System;
using System.Globalization;
class Sample
{
public static void Main()
{
RegionInfo ri = new RegionInfo("SE"); // Sweden
Console.WriteLine("Region English Name: . . . {0}", ri.EnglishName);
Console.WriteLine("Native Name: . . . . . . . {0}", ri.NativeName);
Console.WriteLine("Currency English Name: . . {0}", ri.CurrencyEnglishName);
Console.WriteLine("Currency Native Name:. . . {0}", ri.CurrencyNativeName);
Console.WriteLine("Geographical ID: . . . . . {0}", ri.GeoId);
}
}
/*
This code example produces the following results:
Region English Name: . . . Sweden
Native Name: . . . . . . . Sverige
Currency English Name: . . Swedish Krona
Currency Native Name:. . . Svensk krona
Geographical ID: . . . . . 221
*/
' This example demonstrates the RegionInfo.EnglishName, NativeName,
' CurrencyEnglishName, CurrencyNativeName, and GeoId properties.
Imports System.Globalization
Class Sample
Public Shared Sub Main()
Dim ri As New RegionInfo("SE") ' Sweden
Console.WriteLine("Region English Name: . . . {0}", ri.EnglishName)
Console.WriteLine("Native Name: . . . . . . . {0}", ri.NativeName)
Console.WriteLine("Currency English Name: . . {0}", ri.CurrencyEnglishName)
Console.WriteLine("Currency Native Name:. . . {0}", ri.CurrencyNativeName)
Console.WriteLine("Geographical ID: . . . . . {0}", ri.GeoId)
End Sub
End Class
'
'This code example produces the following results:
'
'Region English Name: . . . Sweden
'Native Name: . . . . . . . Sverige
'Currency English Name: . . Swedish Krona
'Currency Native Name:. . . Svensk krona
'Geographical ID: . . . . . 221
'
Keterangan
Aplikasi harus menggunakan GeoId properti untuk menyediakan layanan khusus budaya kepada pelanggan. Misalnya, GeoId properti dapat digunakan sebagai kunci untuk mengakses rekaman database yang berisi informasi tertentu tentang negara/wilayah.
Nilai properti ini sesuai dengan fungsi Windows GetUserGeoID
. Untuk daftar pengidentifikasi geografis, lihat Tabel Lokasi Geografis.