猿问

求C#大神帮解决继承问题

namespace ConsoleApplication5
{
    class Program
    {


        static void Main(string[] args)
        {
            string requestUrl = "http://www.most.gov.cn/tztg/201605/t20160503_125403.htm";
            HttpWebRequest myReqeust = WebRequest.Create(requestUrl) as HttpWebRequest;
            myReqeust.Timeout = 1000 * 5; //1秒 = 1000毫秒
            myReqeust.Method = "GET";
            HttpWebResponse myResponse = myReqeust.GetResponse() as HttpWebResponse;
            HttpWebResponse response = (HttpWebResponse)myReqeust.GetResponse();
            Encoding htmlEncoding = Encoding.GetEncoding("GBK");
            using (StreamReader reader = new StreamReader(myResponse.GetResponseStream(), htmlEncoding))
            {
                string html = reader.ReadToEnd();
            }
        }
        public void Main(string[] myReqeust)
        {
            Program programl = new Program();
            int i = Program.main(myReqeust);
            var text = File.ReadAllText("TextFile1.txt");
                var doc = new HtmlAgilityPack.HtmlDocument();
                doc.LoadHtml(text);
                var xpath = "//title[@*]";
                var books= doc.DocumentNode.SelectNodes(xpath);
                foreach (var book in books)
              {
                Console.WriteLine(book.OuterHtml);
              }
        }      
    }
}


好名称都没有了
浏览 1170回答 1
1回答
随时随地看视频慕课网APP
我要回答