GeoLocaltion.CountryPicker 1.0.0

dotnet add package GeoLocaltion.CountryPicker --version 1.0.0
                    
NuGet\Install-Package GeoLocaltion.CountryPicker -Version 1.0.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="GeoLocaltion.CountryPicker" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="GeoLocaltion.CountryPicker" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="GeoLocaltion.CountryPicker" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add GeoLocaltion.CountryPicker --version 1.0.0
                    
#r "nuget: GeoLocaltion.CountryPicker, 1.0.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package GeoLocaltion.CountryPicker@1.0.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=GeoLocaltion.CountryPicker&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=GeoLocaltion.CountryPicker&version=1.0.0
                    
Install as a Cake Tool

GeoLocaltion.CountryPicker

NuGet GitHub stars GitHub forks GitHub issues GitHub license

A .NET library that provides a list of countries with ISO codes, dial codes, and flag emojis, similar to a Flutter country picker. Perfect for building apps that require country selection or phone input.


Features

  • Get all countries with name, ISO code, dial code, and flag emoji.
  • Search countries by ISO code or name.
  • Fully self-contained and lightweight.
  • Ready to use in any .NET 9+ project.

Installation

Install via NuGet:

dotnet add package GeoLocaltion.CountryPicker --version 1.0.0

Or using the Package Manager:

Install-Package GeoLocaltion.CountryPicker -Version 1.0.0

Usage

using GeoLocaltion;

class Program
{
    static void Main()
    {
        var service = new CountryService();

        // Get all countries
        var countries = service.GetAllCountries();
        foreach (var country in countries)
        {
            Console.WriteLine($"{country.Name} ({country.Code}) {country.DialCode} {country.FlagEmoji}");
        }

        // Search by ISO code
        var india = service.GetCountryByCode("IN");
        Console.WriteLine($"\nCountry with code 'IN': {india?.Name} {india?.DialCode} {india?.FlagEmoji}");

        // Search by name
        var germany = service.GetCountryByName("Germany");
        Console.WriteLine($"\nCountry named 'Germany': {germany?.Code} {germany?.DialCode} {germany?.FlagEmoji}");
    }
}

Example Output

United States (US) +1 🇺🇸
Canada (CA) +1 🇨🇦
India (IN) +91 🇮🇳
...
Country with code 'IN': India +91 🇮🇳
Country named 'Germany': DE +49 🇩🇪

Contributing

Contributions are welcome! You can:

  • Add missing countries or update dial codes.
  • Improve documentation or examples.

License

This project is licensed under the MIT License. See LICENSE for details.

Product Compatible and additional computed target framework versions.
.NET net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net9.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.

Version Downloads Last Updated
1.0.0 99 2/12/2026