Country list contains code, names and chinese name (both traditional and simplified). Data retrieved from following Wiki page:
You can install this package from NuGet Page or use following command:
PM> Install-Package ISO3166-1-ZH
您可以
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。執行 WebCrawler,畫面 將 會 詢問要 存 放 產出 檔案的 資料 夾路徑 ;如果沒 有 提供 ,將 會 產出 在 執行 檔的相 同 資料 夾。兩個 檔案會 被 產出 :iso3166.json與 Country.cs。