Basic WebClient : Web Client : Network C# Source Code


Custom Search

C# Source Code » Network » Web Client »

 

Basic WebClient








    



using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.IO;
using System.Net;

public class MainClass {
    public static void Main() {
        System.Net.WebClient Client = new WebClient();
        Stream strm = Client.OpenRead("http://www.reuters.com");
        StreamReader sr = new StreamReader(strm);
        string line;
        while ((line = sr.ReadLine()) != null) {
            Console.WriteLine(line);
        }
        strm.Close();
    }
}
           
       
    
   
  
   







HTML code for linking to this page:

Follow Navioo On Twitter

C# Source Code

 Navioo Network
» Web Client