Download a web page in a thread : Web Crawler : Network C# Source Code


Custom Search

C# Source Code » Network » Web Crawler »

 

Download a web page in a thread








    


using System;
using System.Net;
using System.Threading;

class ThreadTest {
    static void Main() {
        new Thread(Download).Start();
        Console.WriteLine("download's happening!");
        Console.ReadLine();
    }

    static void Download() {
        using (WebClient wc = new WebClient())
            try {
                wc.Proxy = null;
                wc.DownloadFile("http://www.google.com", "index.html");
                Console.WriteLine("Finished!");
            } catch (Exception ex) {
            }
    }
}
           
       
    
   
  
   







HTML code for linking to this page:

Follow Navioo On Twitter

C# Source Code

 Navioo Network
» Web Crawler