Most of the web applications and windows applications some time needs the country list to be displayed to the user.
Here is the class....use them and try to share it if possible..
public class GetCountryNames
{
public List<string> GetCountryList()
{
List<string> countryList=new List<string>();
string keyPath = @"SOFTWARE\Microsoft\Windows\Currentversion\Telephony\Country List\";
string[] allData = Registry.LocalMachine.OpenSubKey(keyPath).GetSubKeyNames();
foreach (string s in allData)
{
//International Freephone Service
if (Registry.LocalMachine.OpenSubKey(keyPath + s).GetValue("Name").ToString() != "International Freephone Service")
{
countryList.Add(Registry.LocalMachine.OpenSubKey(keyPath + s).GetValue("Name").ToString());
}
}
return countryList;
}
}
}