read url c#

 

using System.Net;
using System.Windows.Forms;

string url = "http://www.com";
string result = null;

try
{
    WebClient client = new WebClient();
    result = client.DownloadString( url );
}
catch (Exception ex)
{
    // handle error
    MessageBox.Show( ex.Message );
}
原文地址:https://www.cnblogs.com/greencolor/p/2042778.html