//add webservice
http://www.webservicex.net/country.asmx
WebServiceX.country client = new
WebServiceX.country();
var
currencies = client.GetCurrencies();
//Convert the XML result into dataset/table
DataSet
ds = new DataSet();
ds.ReadXml(new
System.Xml.XmlTextReader(new StringReader(currencies)));
string
name = null;
string
code = null;//name & country code.
foreach (DataRow r in ds.Tables[0].Rows)
{
name = r["Name"].ToString();
code = r["CountryCode"].ToString();
Console.WriteLine(name + " " + code);
}
No comments:
Post a Comment