vertigra / CountryInfo.Net

Information about countries in enumeration

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

logo

CountryInfo.Net

Build status

How to use

Code ISO 3166-1 alpha-2

Use the Cca2 enumeration to get the country code ISO 3166-1 alpha-2. The name of the country is written in the commentary:

cca2_select_country

Code ISO 3166-1 numeric

Use the Ccn3 enumeration to get the country code ISO 3166-1 numeric.

Console.WriteLine("Country code " + Ccn3.Bahrain + " is " + (int)Ccn3.Bahrain)
Console.WriteLine("Country code " + Ccn3.Bahrain + " is " + ((int)Ccn3.Bahrain).ToString("000"));

/* Output:
   Country code Bahrain is 48
   Country code Bahrain is 048
*/

Code ISO 3166-1 alpha-3

Use the Cca3 enumeration to get the country code ISO 3166-1 alpha-3. The name of the country is written in the commentary:

cca3_select_country

Code International Olympic Committee

Use the Cioc enumeration to get the country code International Olympic Committee. The name of the country is written in the commentary:

Cioc_select_country

Thanks

The logo is provided by the site icons8.com

About

Information about countries in enumeration


Languages

Language:C# 100.0%