C# 得到页面Code

using System.Net;

public string getCode(string url)
        {
            string htmlCode;
            using (WebClient client = new WebClient())
            {
                 htmlCode = client.DownloadString(url);
            }
            return htmlCode;
        }
原文地址:https://www.cnblogs.com/tangpeng97/p/7838535.html