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 );}
本文共 327 字,大约阅读时间需要 1 分钟。
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/archive/2011/05/11/2042778.html