Country list contains code, names and chinese name (both traditional and simplified). Data retrieved from following Wiki page:
包含代碼、名稱與中文名稱(正體與簡體)的國家清單。資料來自下列 Wiki 頁面:
You can install this package from NuGet Page or use following command:
PM> Install-Package ISO3166-1-ZH
您可以透過 NuGet 下載此套件,或使用下列指令:
PM> Install-Package ISO3166-1-ZH
To access the list:
List<CountryModel> list = ISO3166.Country.List;
Properties of CountryModel:
public string Name { get; set; }
public string TwoLetterCode { get; set; }
public string ThreeLetterCode { get; set; }
public string NumericCode { get; set; }
public string TraditionalChineseName { get; set; }
public string SimplifiedChineseName { get; set; }
public bool Independent { get; set; }
Use WebCrawler to retrieve this lastest country data from Wiki page, and generate iso3166.json and Country.cs.
- Download WebCrawler.
- Run WebCrawler, an output path (folder) is needed to store generated files; if provided empty, it will store at same folder contains the application.
- Two files will be generate: iso3166.json and Country.cs.
使用專案內的 WebCrawler 從 Wiki 頁面上取得最新的國家資料,將產出 iso3166.json 和 Country.cs 兩個檔案。
- 下載 WebCrawler。
- 執行 WebCrawler,畫面將會詢問要存放產出檔案的資料夾路徑;如果沒有提供,將會產出在執行檔的相同資料夾。
- 兩個檔案會被產出:iso3166.json 與 Country.cs。