PSC.CSharp.Library.CountryData
8.0.4
See the version list below for details.
dotnet add package PSC.CSharp.Library.CountryData --version 8.0.4
NuGet\Install-Package PSC.CSharp.Library.CountryData -Version 8.0.4
<PackageReference Include="PSC.CSharp.Library.CountryData" Version="8.0.4" />
paket add PSC.CSharp.Library.CountryData --version 8.0.4
#r "nuget: PSC.CSharp.Library.CountryData, 8.0.4"
// Install PSC.CSharp.Library.CountryData as a Cake Addin #addin nuget:?package=PSC.CSharp.Library.CountryData&version=8.0.4 // Install PSC.CSharp.Library.CountryData as a Cake Tool #tool nuget:?package=PSC.CSharp.Library.CountryData&version=8.0.4
Country Data library for NET8
A simple cross-platform offline .NET library for getting country data. The library is based on the ISO-3166-1 standard. Based on the operating system, using Unicode, you can display the flag of the country. On Windows, the emoji displays the shortcode of the country, not the flag.
The library has the flags of the countries in SVG format. The flags can be displayed in two different types: Square
and Wide
.
Install Library
To install the library in your project, open the Package Manager and type the following command:
Install-Package PSC.CSharp.CountryData
Also, you can use the .NET CLI to install the library. Type the following command:
dotnet add package PSC.CSharp.CountryData
Usage
Here is an example how to use the library in your project.
Initialize the CountryData
// loads all Country Data via the constructor (You can initialize this once as a singleton)
var countryHelper = new CountryHelper();
Get the list of countries
foreach (var country in countries)
Console.WriteLine(country);
Get the list of regions in a country by country code
var regions = countryHelper.GetRegionByCountryCode("IT");
foreach (var region in regions)
Console.WriteLine(region.Name);
Using lambda for custom queries
GetCountryData()
returns an IEnumerable<Country>
which can be queried with Lambda for a more flexible usage.
var data = countryHelper.GetCountryData();
Get the list of countries by their Names
This code displays the name of the countries using a foreach
.
var countries = data.Select(c => c.CountryName).ToList();
foreach (var country in countries)
Console.WriteLine(country);
Here the code to use Linq
to filter the list.
data.Where(x => x.CountryShortCode == "US")
.Select(r=>r.Regions).FirstOrDefault()
.ToList();
Get the flag for a country
In the library, I added a method to get the flag of a country. The flags are in SVG format. The type of the flag can be Square
or Wide
.
var flag = helper.GetFlagByCountryCode("GB", FlagType.Square);
List of supported ISO-3166-1 country codes
Here is the list of supported ISO-3166-1 country codes, their code point pairs and Emoji
flags. Based on the operating system, you see different Emoji.
In Windows, you see the short name of the country. In iOS and Android, the flag of the correspondent country is displayed.
ISO | Emoji | Unicode | Name |
---|---|---|---|
AD | ๐ฆ๐ฉ | U+1F1E6 U+1F1E9 | Andorra |
AE | ๐ฆ๐ช | U+1F1E6 U+1F1EA | United Arab Emirates |
AF | ๐ฆ๐ซ | U+1F1E6 U+1F1EB | Afghanistan |
AG | ๐ฆ๐ฌ | U+1F1E6 U+1F1EC | Antigua and Barbuda |
AI | ๐ฆ๐ฎ | U+1F1E6 U+1F1EE | Anguilla |
AL | ๐ฆ๐ฑ | U+1F1E6 U+1F1F1 | Albania |
AM | ๐ฆ๐ฒ | U+1F1E6 U+1F1F2 | Armenia |
AO | ๐ฆ๐ด | U+1F1E6 U+1F1F4 | Angola |
AQ | ๐ฆ๐ถ | U+1F1E6 U+1F1F6 | Antarctica |
AR | ๐ฆ๐ท | U+1F1E6 U+1F1F7 | Argentina |
AS | ๐ฆ๐ธ | U+1F1E6 U+1F1F8 | American Samoa |
AT | ๐ฆ๐น | U+1F1E6 U+1F1F9 | Austria |
AU | ๐ฆ๐บ | U+1F1E6 U+1F1FA | Australia |
AW | ๐ฆ๐ผ | U+1F1E6 U+1F1FC | Aruba |
AX | ๐ฆ๐ฝ | U+1F1E6 U+1F1FD | ร land Islands |
AZ | ๐ฆ๐ฟ | U+1F1E6 U+1F1FF | Azerbaijan |
BA | ๐ง๐ฆ | U+1F1E7 U+1F1E6 | Bosnia and Herzegovina |
BB | ๐ง๐ง | U+1F1E7 U+1F1E7 | Barbados |
BD | ๐ง๐ฉ | U+1F1E7 U+1F1E9 | Bangladesh |
BE | ๐ง๐ช | U+1F1E7 U+1F1EA | Belgium |
BF | ๐ง๐ซ | U+1F1E7 U+1F1EB | Burkina Faso |
BG | ๐ง๐ฌ | U+1F1E7 U+1F1EC | Bulgaria |
BH | ๐ง๐ญ | U+1F1E7 U+1F1ED | Bahrain |
BI | ๐ง๐ฎ | U+1F1E7 U+1F1EE | Burundi |
BJ | ๐ง๐ฏ | U+1F1E7 U+1F1EF | Benin |
BL | ๐ง๐ฑ | U+1F1E7 U+1F1F1 | Saint Barthรฉlemy |
BM | ๐ง๐ฒ | U+1F1E7 U+1F1F2 | Bermuda |
BN | ๐ง๐ณ | U+1F1E7 U+1F1F3 | Brunei Darussalam |
BO | ๐ง๐ด | U+1F1E7 U+1F1F4 | Bolivia |
BQ | ๐ง๐ถ | U+1F1E7 U+1F1F6 | Bonaire, Sint Eustatius and Saba |
BR | ๐ง๐ท | U+1F1E7 U+1F1F7 | Brazil |
BS | ๐ง๐ธ | U+1F1E7 U+1F1F8 | Bahamas |
BT | ๐ง๐น | U+1F1E7 U+1F1F9 | Bhutan |
BV | ๐ง๐ป | U+1F1E7 U+1F1FB | Bouvet Island |
BW | ๐ง๐ผ | U+1F1E7 U+1F1FC | Botswana |
BY | ๐ง๐พ | U+1F1E7 U+1F1FE | Belarus |
BZ | ๐ง๐ฟ | U+1F1E7 U+1F1FF | Belize |
CA | ๐จ๐ฆ | U+1F1E8 U+1F1E6 | Canada |
CC | ๐จ๐จ | U+1F1E8 U+1F1E8 | Cocos (Keeling) Islands |
CD | ๐จ๐ฉ | U+1F1E8 U+1F1E9 | Congo |
CF | ๐จ๐ซ | U+1F1E8 U+1F1EB | Central African Republic |
CG | ๐จ๐ฌ | U+1F1E8 U+1F1EC | Congo |
CH | ๐จ๐ญ | U+1F1E8 U+1F1ED | Switzerland |
CI | ๐จ๐ฎ | U+1F1E8 U+1F1EE | Cรดte D'Ivoire |
CK | ๐จ๐ฐ | U+1F1E8 U+1F1F0 | Cook Islands |
CL | ๐จ๐ฑ | U+1F1E8 U+1F1F1 | Chile |
CM | ๐จ๐ฒ | U+1F1E8 U+1F1F2 | Cameroon |
CN | ๐จ๐ณ | U+1F1E8 U+1F1F3 | China |
CO | ๐จ๐ด | U+1F1E8 U+1F1F4 | Colombia |
CR | ๐จ๐ท | U+1F1E8 U+1F1F7 | Costa Rica |
CU | ๐จ๐บ | U+1F1E8 U+1F1FA | Cuba |
CV | ๐จ๐ป | U+1F1E8 U+1F1FB | Cape Verde |
CW | ๐จ๐ผ | U+1F1E8 U+1F1FC | Curaรงao |
CX | ๐จ๐ฝ | U+1F1E8 U+1F1FD | Christmas Island |
CY | ๐จ๐พ | U+1F1E8 U+1F1FE | Cyprus |
CZ | ๐จ๐ฟ | U+1F1E8 U+1F1FF | Czech Republic |
DE | ๐ฉ๐ช | U+1F1E9 U+1F1EA | Germany |
DJ | ๐ฉ๐ฏ | U+1F1E9 U+1F1EF | Djibouti |
DK | ๐ฉ๐ฐ | U+1F1E9 U+1F1F0 | Denmark |
DM | ๐ฉ๐ฒ | U+1F1E9 U+1F1F2 | Dominica |
DO | ๐ฉ๐ด | U+1F1E9 U+1F1F4 | Dominican Republic |
DZ | ๐ฉ๐ฟ | U+1F1E9 U+1F1FF | Algeria |
EC | ๐ช๐จ | U+1F1EA U+1F1E8 | Ecuador |
EE | ๐ช๐ช | U+1F1EA U+1F1EA | Estonia |
EG | ๐ช๐ฌ | U+1F1EA U+1F1EC | Egypt |
EH | ๐ช๐ญ | U+1F1EA U+1F1ED | Western Sahara |
ER | ๐ช๐ท | U+1F1EA U+1F1F7 | Eritrea |
ES | ๐ช๐ธ | U+1F1EA U+1F1F8 | Spain |
ET | ๐ช๐น | U+1F1EA U+1F1F9 | Ethiopia |
FI | ๐ซ๐ฎ | U+1F1EB U+1F1EE | Finland |
FJ | ๐ซ๐ฏ | U+1F1EB U+1F1EF | Fiji |
FK | ๐ซ๐ฐ | U+1F1EB U+1F1F0 | Falkland Islands (Malvinas) |
FM | ๐ซ๐ฒ | U+1F1EB U+1F1F2 | Micronesia |
FO | ๐ซ๐ด | U+1F1EB U+1F1F4 | Faroe Islands |
FR | ๐ซ๐ท | U+1F1EB U+1F1F7 | France |
GA | ๐ฌ๐ฆ | U+1F1EC U+1F1E6 | Gabon |
GB | ๐ฌ๐ง | U+1F1EC U+1F1E7 | United Kingdom |
GD | ๐ฌ๐ฉ | U+1F1EC U+1F1E9 | Grenada |
GE | ๐ฌ๐ช | U+1F1EC U+1F1EA | Georgia |
GF | ๐ฌ๐ซ | U+1F1EC U+1F1EB | French Guiana |
GG | ๐ฌ๐ฌ | U+1F1EC U+1F1EC | Guernsey |
GH | ๐ฌ๐ญ | U+1F1EC U+1F1ED | Ghana |
GI | ๐ฌ๐ฎ | U+1F1EC U+1F1EE | Gibraltar |
GL | ๐ฌ๐ฑ | U+1F1EC U+1F1F1 | Greenland |
GM | ๐ฌ๐ฒ | U+1F1EC U+1F1F2 | Gambia |
GN | ๐ฌ๐ณ | U+1F1EC U+1F1F3 | Guinea |
GP | ๐ฌ๐ต | U+1F1EC U+1F1F5 | Guadeloupe |
GQ | ๐ฌ๐ถ | U+1F1EC U+1F1F6 | Equatorial Guinea |
GR | ๐ฌ๐ท | U+1F1EC U+1F1F7 | Greece |
GS | ๐ฌ๐ธ | U+1F1EC U+1F1F8 | South Georgia |
GT | ๐ฌ๐น | U+1F1EC U+1F1F9 | Guatemala |
GU | ๐ฌ๐บ | U+1F1EC U+1F1FA | Guam |
GW | ๐ฌ๐ผ | U+1F1EC U+1F1FC | Guinea-Bissau |
GY | ๐ฌ๐พ | U+1F1EC U+1F1FE | Guyana |
HK | ๐ญ๐ฐ | U+1F1ED U+1F1F0 | Hong Kong |
HM | ๐ญ๐ฒ | U+1F1ED U+1F1F2 | Heard Island and Mcdonald Islands |
HN | ๐ญ๐ณ | U+1F1ED U+1F1F3 | Honduras |
HR | ๐ญ๐ท | U+1F1ED U+1F1F7 | Croatia |
HT | ๐ญ๐น | U+1F1ED U+1F1F9 | Haiti |
HU | ๐ญ๐บ | U+1F1ED U+1F1FA | Hungary |
ID | ๐ฎ๐ฉ | U+1F1EE U+1F1E9 | Indonesia |
IE | ๐ฎ๐ช | U+1F1EE U+1F1EA | Ireland |
IL | ๐ฎ๐ฑ | U+1F1EE U+1F1F1 | Israel |
IM | ๐ฎ๐ฒ | U+1F1EE U+1F1F2 | Isle of Man |
IN | ๐ฎ๐ณ | U+1F1EE U+1F1F3 | India |
IO | ๐ฎ๐ด | U+1F1EE U+1F1F4 | British Indian Ocean Territory |
IQ | ๐ฎ๐ถ | U+1F1EE U+1F1F6 | Iraq |
IR | ๐ฎ๐ท | U+1F1EE U+1F1F7 | Iran |
IS | ๐ฎ๐ธ | U+1F1EE U+1F1F8 | Iceland |
IT | ๐ฎ๐น | U+1F1EE U+1F1F9 | Italy |
JE | ๐ฏ๐ช | U+1F1EF U+1F1EA | Jersey |
JM | ๐ฏ๐ฒ | U+1F1EF U+1F1F2 | Jamaica |
JO | ๐ฏ๐ด | U+1F1EF U+1F1F4 | Jordan |
JP | ๐ฏ๐ต | U+1F1EF U+1F1F5 | Japan |
KE | ๐ฐ๐ช | U+1F1F0 U+1F1EA | Kenya |
KG | ๐ฐ๐ฌ | U+1F1F0 U+1F1EC | Kyrgyzstan |
KH | ๐ฐ๐ญ | U+1F1F0 U+1F1ED | Cambodia |
KI | ๐ฐ๐ฎ | U+1F1F0 U+1F1EE | Kiribati |
KM | ๐ฐ๐ฒ | U+1F1F0 U+1F1F2 | Comoros |
KN | ๐ฐ๐ณ | U+1F1F0 U+1F1F3 | Saint Kitts and Nevis |
KP | ๐ฐ๐ต | U+1F1F0 U+1F1F5 | North Korea |
KR | ๐ฐ๐ท | U+1F1F0 U+1F1F7 | South Korea |
KW | ๐ฐ๐ผ | U+1F1F0 U+1F1FC | Kuwait |
KY | ๐ฐ๐พ | U+1F1F0 U+1F1FE | Cayman Islands |
KZ | ๐ฐ๐ฟ | U+1F1F0 U+1F1FF | Kazakhstan |
LA | ๐ฑ๐ฆ | U+1F1F1 U+1F1E6 | Lao People's Democratic Republic |
LB | ๐ฑ๐ง | U+1F1F1 U+1F1E7 | Lebanon |
LC | ๐ฑ๐จ | U+1F1F1 U+1F1E8 | Saint Lucia |
LI | ๐ฑ๐ฎ | U+1F1F1 U+1F1EE | Liechtenstein |
LK | ๐ฑ๐ฐ | U+1F1F1 U+1F1F0 | Sri Lanka |
LR | ๐ฑ๐ท | U+1F1F1 U+1F1F7 | Liberia |
LS | ๐ฑ๐ธ | U+1F1F1 U+1F1F8 | Lesotho |
LT | ๐ฑ๐น | U+1F1F1 U+1F1F9 | Lithuania |
LU | ๐ฑ๐บ | U+1F1F1 U+1F1FA | Luxembourg |
LV | ๐ฑ๐ป | U+1F1F1 U+1F1FB | Latvia |
LY | ๐ฑ๐พ | U+1F1F1 U+1F1FE | Libya |
MA | ๐ฒ๐ฆ | U+1F1F2 U+1F1E6 | Morocco |
MC | ๐ฒ๐จ | U+1F1F2 U+1F1E8 | Monaco |
MD | ๐ฒ๐ฉ | U+1F1F2 U+1F1E9 | Moldova |
ME | ๐ฒ๐ช | U+1F1F2 U+1F1EA | Montenegro |
MF | ๐ฒ๐ซ | U+1F1F2 U+1F1EB | Saint Martin (French Part) |
MG | ๐ฒ๐ฌ | U+1F1F2 U+1F1EC | Madagascar |
MH | ๐ฒ๐ญ | U+1F1F2 U+1F1ED | Marshall Islands |
MK | ๐ฒ๐ฐ | U+1F1F2 U+1F1F0 | Macedonia |
ML | ๐ฒ๐ฑ | U+1F1F2 U+1F1F1 | Mali |
MM | ๐ฒ๐ฒ | U+1F1F2 U+1F1F2 | Myanmar |
MN | ๐ฒ๐ณ | U+1F1F2 U+1F1F3 | Mongolia |
MO | ๐ฒ๐ด | U+1F1F2 U+1F1F4 | Macao |
MP | ๐ฒ๐ต | U+1F1F2 U+1F1F5 | Northern Mariana Islands |
MQ | ๐ฒ๐ถ | U+1F1F2 U+1F1F6 | Martinique |
MR | ๐ฒ๐ท | U+1F1F2 U+1F1F7 | Mauritania |
MS | ๐ฒ๐ธ | U+1F1F2 U+1F1F8 | Montserrat |
MT | ๐ฒ๐น | U+1F1F2 U+1F1F9 | Malta |
MU | ๐ฒ๐บ | U+1F1F2 U+1F1FA | Mauritius |
MV | ๐ฒ๐ป | U+1F1F2 U+1F1FB | Maldives |
MW | ๐ฒ๐ผ | U+1F1F2 U+1F1FC | Malawi |
MX | ๐ฒ๐ฝ | U+1F1F2 U+1F1FD | Mexico |
MY | ๐ฒ๐พ | U+1F1F2 U+1F1FE | Malaysia |
MZ | ๐ฒ๐ฟ | U+1F1F2 U+1F1FF | Mozambique |
NA | ๐ณ๐ฆ | U+1F1F3 U+1F1E6 | Namibia |
NC | ๐ณ๐จ | U+1F1F3 U+1F1E8 | New Caledonia |
NE | ๐ณ๐ช | U+1F1F3 U+1F1EA | Niger |
NF | ๐ณ๐ซ | U+1F1F3 U+1F1EB | Norfolk Island |
NG | ๐ณ๐ฌ | U+1F1F3 U+1F1EC | Nigeria |
NI | ๐ณ๐ฎ | U+1F1F3 U+1F1EE | Nicaragua |
NL | ๐ณ๐ฑ | U+1F1F3 U+1F1F1 | Netherlands |
NO | ๐ณ๐ด | U+1F1F3 U+1F1F4 | Norway |
NP | ๐ณ๐ต | U+1F1F3 U+1F1F5 | Nepal |
NR | ๐ณ๐ท | U+1F1F3 U+1F1F7 | Nauru |
NU | ๐ณ๐บ | U+1F1F3 U+1F1FA | Niue |
NZ | ๐ณ๐ฟ | U+1F1F3 U+1F1FF | New Zealand |
OM | ๐ด๐ฒ | U+1F1F4 U+1F1F2 | Oman |
PA | ๐ต๐ฆ | U+1F1F5 U+1F1E6 | Panama |
PE | ๐ต๐ช | U+1F1F5 U+1F1EA | Peru |
PF | ๐ต๐ซ | U+1F1F5 U+1F1EB | French Polynesia |
PG | ๐ต๐ฌ | U+1F1F5 U+1F1EC | Papua New Guinea |
PH | ๐ต๐ญ | U+1F1F5 U+1F1ED | Philippines |
PK | ๐ต๐ฐ | U+1F1F5 U+1F1F0 | Pakistan |
PL | ๐ต๐ฑ | U+1F1F5 U+1F1F1 | Poland |
PM | ๐ต๐ฒ | U+1F1F5 U+1F1F2 | Saint Pierre and Miquelon |
PN | ๐ต๐ณ | U+1F1F5 U+1F1F3 | Pitcairn |
PR | ๐ต๐ท | U+1F1F5 U+1F1F7 | Puerto Rico |
PS | ๐ต๐ธ | U+1F1F5 U+1F1F8 | Palestinian Territory |
PT | ๐ต๐น | U+1F1F5 U+1F1F9 | Portugal |
PW | ๐ต๐ผ | U+1F1F5 U+1F1FC | Palau |
PY | ๐ต๐พ | U+1F1F5 U+1F1FE | Paraguay |
QA | ๐ถ๐ฆ | U+1F1F6 U+1F1E6 | Qatar |
RE | ๐ท๐ช | U+1F1F7 U+1F1EA | Rรฉunion |
RO | ๐ท๐ด | U+1F1F7 U+1F1F4 | Romania |
RS | ๐ท๐ธ | U+1F1F7 U+1F1F8 | Serbia |
RU | ๐ท๐บ | U+1F1F7 U+1F1FA | Russia |
RW | ๐ท๐ผ | U+1F1F7 U+1F1FC | Rwanda |
SA | ๐ธ๐ฆ | U+1F1F8 U+1F1E6 | Saudi Arabia |
SB | ๐ธ๐ง | U+1F1F8 U+1F1E7 | Solomon Islands |
SC | ๐ธ๐จ | U+1F1F8 U+1F1E8 | Seychelles |
SD | ๐ธ๐ฉ | U+1F1F8 U+1F1E9 | Sudan |
SE | ๐ธ๐ช | U+1F1F8 U+1F1EA | Sweden |
SG | ๐ธ๐ฌ | U+1F1F8 U+1F1EC | Singapore |
SH | ๐ธ๐ญ | U+1F1F8 U+1F1ED | Saint Helena, Ascension and Tristan Da Cunha |
SI | ๐ธ๐ฎ | U+1F1F8 U+1F1EE | Slovenia |
SJ | ๐ธ๐ฏ | U+1F1F8 U+1F1EF | Svalbard and Jan Mayen |
SK | ๐ธ๐ฐ | U+1F1F8 U+1F1F0 | Slovakia |
SL | ๐ธ๐ฑ | U+1F1F8 U+1F1F1 | Sierra Leone |
SM | ๐ธ๐ฒ | U+1F1F8 U+1F1F2 | San Marino |
SN | ๐ธ๐ณ | U+1F1F8 U+1F1F3 | Senegal |
SO | ๐ธ๐ด | U+1F1F8 U+1F1F4 | Somalia |
SR | ๐ธ๐ท | U+1F1F8 U+1F1F7 | Suriname |
SS | ๐ธ๐ธ | U+1F1F8 U+1F1F8 | South Sudan |
ST | ๐ธ๐น | U+1F1F8 U+1F1F9 | Sao Tome and Principe |
SV | ๐ธ๐ป | U+1F1F8 U+1F1FB | El Salvador |
SX | ๐ธ๐ฝ | U+1F1F8 U+1F1FD | Sint Maarten (Dutch Part) |
SY | ๐ธ๐พ | U+1F1F8 U+1F1FE | Syrian Arab Republic |
SZ | ๐ธ๐ฟ | U+1F1F8 U+1F1FF | Swaziland |
TC | ๐น๐จ | U+1F1F9 U+1F1E8 | Turks and Caicos Islands |
TD | ๐น๐ฉ | U+1F1F9 U+1F1E9 | Chad |
TF | ๐น๐ซ | U+1F1F9 U+1F1EB | French Southern Territories |
TG | ๐น๐ฌ | U+1F1F9 U+1F1EC | Togo |
TH | ๐น๐ญ | U+1F1F9 U+1F1ED | Thailand |
TJ | ๐น๐ฏ | U+1F1F9 U+1F1EF | Tajikistan |
TK | ๐น๐ฐ | U+1F1F9 U+1F1F0 | Tokelau |
TL | ๐น๐ฑ | U+1F1F9 U+1F1F1 | Timor-Leste |
TM | ๐น๐ฒ | U+1F1F9 U+1F1F2 | Turkmenistan |
TN | ๐น๐ณ | U+1F1F9 U+1F1F3 | Tunisia |
TO | ๐น๐ด | U+1F1F9 U+1F1F4 | Tonga |
TR | ๐น๐ท | U+1F1F9 U+1F1F7 | Turkey |
TT | ๐น๐น | U+1F1F9 U+1F1F9 | Trinidad and Tobago |
TV | ๐น๐ป | U+1F1F9 U+1F1FB | Tuvalu |
TW | ๐น๐ผ | U+1F1F9 U+1F1FC | Taiwan |
TZ | ๐น๐ฟ | U+1F1F9 U+1F1FF | Tanzania |
UA | ๐บ๐ฆ | U+1F1FA U+1F1E6 | Ukraine |
UG | ๐บ๐ฌ | U+1F1FA U+1F1EC | Uganda |
UM | ๐บ๐ฒ | U+1F1FA U+1F1F2 | United States Minor Outlying Islands |
US | ๐บ๐ธ | U+1F1FA U+1F1F8 | United States |
UY | ๐บ๐พ | U+1F1FA U+1F1FE | Uruguay |
UZ | ๐บ๐ฟ | U+1F1FA U+1F1FF | Uzbekistan |
VA | ๐ป๐ฆ | U+1F1FB U+1F1E6 | Vatican City |
VC | ๐ป๐จ | U+1F1FB U+1F1E8 | Saint Vincent and The Grenadines |
VE | ๐ป๐ช | U+1F1FB U+1F1EA | Venezuela |
VG | ๐ป๐ฌ | U+1F1FB U+1F1EC | Virgin Islands, British |
VI | ๐ป๐ฎ | U+1F1FB U+1F1EE | Virgin Islands, U.S. |
VN | ๐ป๐ณ | U+1F1FB U+1F1F3 | Viet Nam |
VU | ๐ป๐บ | U+1F1FB U+1F1FA | Vanuatu |
WF | ๐ผ๐ซ | U+1F1FC U+1F1EB | Wallis and Futuna |
WS | ๐ผ๐ธ | U+1F1FC U+1F1F8 | Samoa |
YE | ๐พ๐ช | U+1F1FE U+1F1EA | Yemen |
YT | ๐พ๐น | U+1F1FE U+1F1F9 | Mayotte |
ZA | ๐ฟ๐ฆ | U+1F1FF U+1F1E6 | South Africa |
ZM | ๐ฟ๐ฒ | U+1F1FF U+1F1F2 | Zambia |
ZW | ๐ฟ๐ผ | U+1F1FF U+1F1FC | Zimbabwe |
Functions
Function | Return | Description |
---|---|---|
GetCountries() | IEnumerable<string> | Gets the list of all countries in the world |
GetCountryByCode | Country | Returns a single Country Data by ShortCode |
GetCountryData() | IEnumerable<Country> | Gets the list of all countries in the world with their data |
GetCountryEmojiFlag | string | Returns the Emoji Flag of a country by ShortCode |
GetRegionByCountryCode | List<Regions> | Returns the Regions of a country by ShortCode |
GetJsonData | string | Returns the JSON Data of all countries in the world |
Flags
Function | Return | Description |
---|---|---|
GetFlagByCountryCode | string | Returns the Flag of a country by ShortCode |
GetFlagData | FlagModel | Return the FlagModel of one country by ShortCode |
GetNameByCountryCode | string | Returns the Name of a country by ShortCode |
Get a full SVG
The GetFlagByCountryCode
returns only the content of the SVG file. What it doesn't have is the XML
declaration and the DOCTYPE
declaration.
If you want to get the full SVG file, you can use the GetFullSVG
function in the SVGFlags
static class.
var svgFlag = SVGFlags.GetFullSVG(SVGFlags.lgbt_1, "300", "300");
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
-
net8.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.