// Please use the following namespace
// using System.Windows.Forms;
// using GrapeCity.Win.Editors;
public void VisitAddressByJISCode()
{
// Creates instance of GcAddress component.
GcAddress gcAddress1 = new GcAddress();
RegionInfo prefectureRegion = gcAddress1.GetPrefectureByJISCode("04");
// Output:
// "04,宮城県,ミヤギケン"
System.Console.WriteLine(prefectureRegion);
IEnumerable<RegionInfo> cityRegions = gcAddress1.GetCityByJISCode("04");
// You will see a list of the cities in 宮城県
foreach (var city in cityRegions)
{
System.Console.WriteLine(city);
}
cityRegions = gcAddress1.GetCityByJISCode("0415");
// Output:
// "04105,宮城県仙台市泉区,ミヤギケンセンダイシイズミク"
foreach (var city in cityRegions)
{
System.Console.WriteLine(city);
}
}
' Please use the following namespace
' using System.Windows.Forms;
' using GrapeCity.Win.Editors;
Public Sub VisitAddressByJISCode()
' Creates instance of GcAddress component.
Dim gcAddress1 As New GcAddress()
Dim prefectureRegion As RegionInfo = gcAddress1.GetPrefectureByJISCode("04")
' Output:
' "04,宮城県,ミヤギケン"
System.Console.WriteLine(prefectureRegion)
Dim cityRegions As IEnumerable(Of RegionInfo) = gcAddress1.GetCityByJISCode("04")
' You will see a list of the cities in 宮城県
For Each city As RegionInfo In cityRegions
System.Console.WriteLine(city)
Next
cityRegions = gcAddress1.GetCityByJISCode("0415")
' Output:
' "04105,宮城県仙台市泉区,ミヤギケンセンダイシイズミク"
For Each city As RegionInfo In cityRegions
System.Console.WriteLine(city)
Next
End Sub