using System.Net; using System.Threading.Tasks; namespace Parser { public static class Download { public static string DownloadXMLSync(string site) { using (var client = new WebClient()) { return client.DownloadString(site); } } public static Task DownloadXML(string site) { using (var client = new WebClient()) { return client.DownloadStringTaskAsync(site); } } } }