A comprehensive .NET library for accessing detailed country information. Features include retrieving country details such as names, codes, capitals, continents, population, and area. Perfect for applications needing geographical data, international business logic, or educational purposes.
$ dotnet add package CountriesInfoA comprehensive multi-language library for accessing detailed country information. Available for multiple platforms and languages.
npm install @mohaned.ghawar/countries-info
pip install countries-info-mg
composer require mohanedghawar/countries-info
dotnet add package CountriesInfo
Each country object contains:
const { getAllCountries, getCountryByName, getCountryByCode, getCountryRegions } = require('@mohaned.ghawar/countries-info');
// Get all countries
const countries = getAllCountries();
// Get country by name
const france = getCountryByName('France');
// Get country by code
const usa = getCountryByCode('USA');
// Get country regions
const usaRegions = getCountryRegions('USA'); // Returns all US statesfrom countries_info import get_all_countries, get_country_by_name, get_country_by_code, get_country_regions
# Get all countries
countries = get_all_countries()
# Get country by name
france = get_country_by_name('France')
# Get country by code
usa = get_country_by_code('USA')
# Get country regions
usa_regions = get_country_regions('USA') # Returns all US statesuse MohanedGhawar\CountriesInfo\CountriesInfo;
$countriesInfo = new CountriesInfo();
// Get all countries
$countries = $countriesInfo->getAllCountries();
// Get country by name
$france = $countriesInfo->getCountryByName('France');
// Get country by code
$usa = $countriesInfo->getCountryByCode('USA');
// Get country regions
$usaRegions = $countriesInfo->getCountryRegions('USA'); // Returns all US statesusing CountriesInfo;
var service = new CountriesService();
// Get all countries
var countries = service.GetAllCountries();
// Get country by code
var usa = service.GetCountryByCode("USA");
// Get countries by continent
var europeanCountries = service.GetCountriesByContinent("Europe");
// Get country regions
var usaRegions = service.GetCountryRegions("USA"); // Returns all US statesDetailed documentation for each platform:
MIT License - see the LICENSE file for details.
Contributions are welcome! Please feel free to submit a Pull Request.
If you encounter any issues or have questions, please file an issue on the appropriate GitHub repository: