XML : Validate redirection implimentation

Let's assume i have 20 url's in list, can anyone help me getting response of all these 20 url's in minimal time[like redirection implimentation verifier].

      XmlNodeList lst = doc.SelectNodes("//match");      for (int i = 0; i < lst.Count; i++)      {                XmlNode node = lst[i];                string URL = lst[i].InnerText;                  var request = (HttpWebRequest)WebRequest.Create(URL);                HttpWebResponse response = (HttpWebResponse)request.GetResponse();                string responseURI = response.ResponseUri.ToString();                   //XLWorkbook workbook = new XLWorkbook();                 //DataTable table = GetYourTable();                 //workbook.Worksheets.Add(table);      }    

The above method is taking too much time, I am not good in "thread" concept, so please help me on this.

No comments:

Post a Comment