Categories

Category Specific RSS

A basic web client in C sharp

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.google.com”);
StreamReader sr = new StreamReader(strm);
string line;
while ((line = sr.ReadLine()) != null) {
Console.WriteLine(line);
}
strm.Close();
}
}

FacebookTwitterGoogle+PinterestTumblrStumbleUponRedditLinkedInBaiduApp.netBufferDeliciousDiggDiigoWordPressBlogger PostEmailPrintFriendlyShare

Leave a Reply