随笔分类 -  Net

摘要:任务 执行1次,马上执行 BackgroundJob.Enqueue() var jobId = BackgroundJob.Enqueue( () => Console.WriteLine( "job" )); 延迟执行,多少时候后执行 BackgroundJob.Schedule() var j 阅读全文
posted @ 2021-07-20 11:45 忆秋年枫叶情 阅读(251) 评论(0) 推荐(0)
摘要:工具→选项→项目和解决方案 阅读全文
posted @ 2021-05-15 18:53 忆秋年枫叶情 阅读(210) 评论(0) 推荐(0)
摘要:Math 1. 绝对值 Math.Abs() 2. 四舍五入 Math.Round() 3. 向上取整 Math.Ceiling() 4. 向下取整 Math.Floor() 阅读全文
posted @ 2021-05-12 14:24 忆秋年枫叶情 阅读(118) 评论(0) 推荐(0)
摘要:dotnet core c# 大文件 读取 //注册编码提供程序 Encoding.RegisterProvider(CodePagesEncodingProvider.Instance); //实例 using var sr = new System.IO.StreamReader(@"E:\Au 阅读全文
posted @ 2021-05-11 11:32 忆秋年枫叶情 阅读(220) 评论(0) 推荐(0)
摘要:完整示例 (控制台) using System; using System.Collections.Generic; using System.Diagnostics; using System.Net.Http; using System.Threading; using System.Threa 阅读全文
posted @ 2021-05-09 11:34 忆秋年枫叶情 阅读(147) 评论(0) 推荐(0)
摘要:GBK编码格式 Encoding.RegisterProvider(CodePagesEncodingProvider.Instance); var encoBytes= Encoding.GetEncoding("gbk").GetString(resBytes); 阅读全文
posted @ 2021-05-08 17:09 忆秋年枫叶情 阅读(419) 评论(0) 推荐(0)
摘要:包安装 nuget包名 HtmlAgilityPack 文档地址 https://html-agility-pack.net/documentation 加载 // 文件加载 var doc = new HtmlDocument(); doc.Load(filePath); // 字符串加载 var 阅读全文
posted @ 2021-05-08 16:33 忆秋年枫叶情 阅读(216) 评论(0) 推荐(0)