- Notifications
You must be signed in to change notification settings - Fork3
The .NET Core implementation for looking up Chinese administrative divisions.
License
NotificationsYou must be signed in to change notification settings
cn/GB2260.cs
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
The .NET Core implementation for looking up Chinese administrative divisions.
The latest GB/T 2260 codes. Read theGB2260 Specification.
Install with nuget:
Install-Package GB2260.Core
GB2260gb=Gb2260Factory.Create();// with default revision 201607GB2260gb=Gb2260Factory.Create(Revision.V201607);// specify the revision
Interface for GB2260.
Get division for the given code.
Divisiondivision=gb.GetDivision("110105")// 北京市 市辖区 朝阳区division.Name// 朝阳区division.Code// 110105(int)division.Revision// 201607division.GetProvince()// 北京市division.GetPrefecture()// 市辖区division.ToString()// 北京市 市辖区 朝阳区
Return a list of provinces in Division data structure.
gb.GetProvinces()
Return a list of prefecture level cities in Division data structure.
gb.GetPrefectures("110000")
Return a list of counties in Division data structure.
gb.GetCounties("110100")
Revision
contains a list of available revisions.
(int)Revision.V201607// return 201607
MIT.
About
The .NET Core implementation for looking up Chinese administrative divisions.
Topics
Resources
License
Stars
Watchers
Forks
Packages0
No packages published