program.cs

来自「利用正则表达式,得到网页中所需要的数据,保存进数据库」· CS 代码 · 共 28 行

CS
28
字号
using System;
using System.Collections.Generic;
using System.Text;
using Plug.Article.Entity;  //导入命名空间
using Plug.Article;         //导入命名空间
namespace UI
{
    class Program
    {
        static void Main(string[] args)
        {
            //得到采集的全部文章
            List<Article> list = Articles.GetArticles();

            //通过循环将全部文章遍历
            for (int i = 0; i < list.Count; i++ )
            {
                Article temp = list[i];
                //将数据输出显示
                Console.Write("标题:" + temp.Title);
                Console.Write("\n链接:" + temp.Url);
                Console.Write("\n阅读次数:" + temp.Views);
                Console.Write("\n作者:" + temp.Author + "\n\n");
            }
        }
    }
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?