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 WebExam
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
WebRequest request = WebRequest.Create("http://www.163.com");
WebResponse resonse = request.GetResponse();
Stream s = resonse.GetResponseStream();
StreamReader sr = new StreamReader(s);
string line;
while ((line = sr.ReadLine()) != null)
{
listBox1.Items.Add(line);
}
s.Close();
}
}
}