GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - selfmadecode/world.net: A .NET library for retrieving countries, states, and cities.

BranchesTags
Open more actions menu

Latest commit

 

History

376 Commits
376 Commits

Folders and files

NameName
Last commit message
Last commit date
.github/workflows
.github/workflows
 
 
src
src
 
 
.gitignore
.gitignore
 
 
Directory.Build.props
Directory.Build.props
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
world.net.sln
world.net.sln
 
 

Repository files navigation

NuGet Version NuGet Downloads License .NET ≥ 2.1 GitHub issues PRs Welcome

Countries.World.Net

Overview

A simple nuget package designed to:

  • Retrieve a list of all countries.
  • Fetch specific details about a country using its identifier.

Features

  1. Get All Countries:

    • Retrieve a read-only list of all available countries, including their names and capitals.
  2. Get Country by ID:

    • Fetch detailed information about a specific country using its unique ID.
  3. Custom Exception Handling:

    • Throws a CountryNotFoundException when an invalid country ID is queried.
  4. Thread-Safe Initialization:

    • Ensures lazy and thread-safe initialization of country data.

Code Example

Here’s how you can use the package to display all countries and details of Afghanistan:

using World.Net;
using World.Net.Helpers;

Console.WriteLine("All Countries:");
var countries = CountryProvider.GetAllCountries();
foreach (var country in countries)
{
    Console.WriteLine($"Name: {country.Name}, Capital: {country.Capital}");
}

Console.WriteLine("\nDetails for Afghanistan:");
var afghanistan = CountryProvider.GetCountry(CountryIdentifier.AfghanistanId);
Console.WriteLine($"Official Name: {afghanistan.OfficialName}, Capital: {afghanistan.Capital}");

Contributors

Thanks to the following people who have contributed to this project:

  • Samuel Idam Deanology
  • Reagan Reuben ReaganDev

About

A .NET library for retrieving countries, states, and cities.

Topics

calling-codescountriescountrydistrictsmapprovinceprovincesstatesworld

Resources

Readme
MIT license
Activity

Stars

13 stars

Watchers

2 watching

Forks

4 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.