using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.IO;
using System.Linq;
using System.Net;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace WebClientExam
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
WebClient client = new WebClient();
Stream s = client.OpenRead("http://www.163.com");
StreamReader sr = new StreamReader(s);
string line;
while ((line = sr.ReadLine()) != null)
{
listBox1.Items.Add(line);
}
s.Close();
}
}
}