随笔分类 -  C#

摘要:写了一个简单爬婴儿配方奶粉的小爬虫,使用HtmlAgilityPack HtmlAgilityPack:https://html agility pack.net/ 参考 "HtmlAgilityPack 详细简介和使用" 前端 阅读全文
posted @ 2020-05-06 01:53 【唐】三三 阅读(318) 评论(0) 推荐(0)
摘要:![](https://img2020.cnblogs.com/blog/196558/202004/196558-20200405001659413-669433505.png)```csharp public class Employee { public int Id { get; set; } public string FirstName { ge... 阅读全文
posted @ 2020-04-05 00:13 【唐】三三 阅读(433) 评论(0) 推荐(0)
摘要:使用这个 TextFileEncodingDetector project csharp using System; using System.Text; using System.Text.RegularExpressions; using System.IO; namespace KlerksS 阅读全文
posted @ 2020-03-10 22:39 【唐】三三 阅读(286) 评论(0) 推荐(0)
摘要:链接: https://pan.baidu.com/s/1tH6qQolpiLOhq8lFBVLdsQ 提取码: 9cc8 v1.1 链接: https://pan.baidu.com/s/1WUVDfnFf58bR lTaFlhIGQ 提取码: ussm 阅读全文
posted @ 2020-03-07 20:44 【唐】三三 阅读(346) 评论(0) 推荐(0)
摘要:参考 "解C 7.0新特性 cnxy.me" "C 6新特性简单总结 Zoe_yan" 阅读全文
posted @ 2020-03-01 13:08 【唐】三三 阅读(245) 评论(0) 推荐(0)
摘要:语法 主要包括指令、文本块、控制块。 1.指令 指令主要包括template, output, assembly, import, include等类型,用以告诉T4引擎如何编译和运行一个模板。这些指令相当于T4引擎的配置参数。 示例: 告诉T4引擎控制块用c 编写; langeuage:输出语言, 阅读全文
posted @ 2019-08-23 22:49 【唐】三三 阅读(1146) 评论(0) 推荐(0)
摘要:未能加载文件或程序集“Jonckers.Service.RedisCacheEngineExtend, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null”或它的某一个依赖项。需要强名称程序集。 (异常来自 HRESULT:0x80131044 阅读全文
posted @ 2019-06-12 14:36 【唐】三三 阅读(2651) 评论(0) 推荐(0)
摘要:如果没有Visual Studio Installer 说明没有安装打包插件 安装打包插件:Microsoft Visual Studio 2017 Installer Projects 工具 扩展和更新 联机,搜索Microsoft Visual Studio 2017 Installer Pro 阅读全文
posted @ 2019-02-27 10:37 【唐】三三 阅读(5076) 评论(0) 推荐(0)
摘要:setting.json 引用Nuget: 和`Microsoft.Extensions.Configuration.Json` 参考:https://docs.microsoft.com/zh cn/aspnet/core/fundamentals/configuration/index?view 阅读全文
posted @ 2018-11-29 16:37 【唐】三三 阅读(728) 评论(0) 推荐(0)
摘要:``` using System; using System.Collections.Generic; using System.Configuration; using System.Data; using System.Data.Common; using System.Data.SqlClient; using System.Linq; using Dapper; namespace DA... 阅读全文
posted @ 2018-11-17 00:06 【唐】三三 阅读(5873) 评论(0) 推荐(0)
摘要:在粗略看了代码后,下面就详细说明相应的测试标记(属性)的用法。 1. [TestFixture(arguments)]属性标记类为测试类,若没有填写参数,则测试类必须含有无参构造函数,否则需要相应的有参构造函数。也可以多个测试[TestFixture(1), TestFixture("a")] 2. 阅读全文
posted @ 2018-10-13 00:54 【唐】三三 阅读(2109) 评论(0) 推荐(0)
摘要:(1)learning hard C 学习笔记 "异步1:《learning hard C 学习笔记》读书笔记(20)异步编程" (2)《C 4.0 图解教程》 22.4 异步编程模式 (3)《精通C (第6版)》 19.2 .NET 委托的简短回顾 19.3 委托的异步性 19.4 异步调用方法 阅读全文
posted @ 2018-06-06 23:20 【唐】三三 阅读(171) 评论(0) 推荐(0)
摘要:参考: "T4 模板自动生成带注释的实体类文件 只需要一个 SqlSugar.dll" 下载: "SqlSugar.zip 4.X" 阅读全文
posted @ 2017-09-13 23:55 【唐】三三 阅读(4862) 评论(0) 推荐(0)
摘要:1. System.Diagnostics.Process.GetCurrentProcess().MainModule.FileName -获取模块的完整路径。 2. System.Environment.CurrentDirectory -获取和设置当前目录(该进程从中启动的目录)的完全限定目录 阅读全文
posted @ 2017-08-08 22:29 【唐】三三 阅读(189) 评论(0) 推荐(0)
摘要:14.5.2 编写异步函数 private static readonly Stopwatch Watch = new Stopwatch(); static void Main(string[] args) { Go(); Console.Read(); } private static asyn 阅读全文
posted @ 2017-08-03 11:36 【唐】三三 阅读(416) 评论(0) 推荐(0)
摘要:线程是创建并发的底层工具,因此具有一定的局限性。 没有简单的方法可以从联合(Join)线程得到“返回值”。因此必须创建一些共享域。当抛出一个异常时,捕捉和处理异常也是麻烦的。 线程完成之后,无法再次启动该线程。相反,只能联合(Join)它(在进程阻塞当前线程)。 与线程相比,Task是一个更高级的抽 阅读全文
posted @ 2017-07-24 22:53 【唐】三三 阅读(640) 评论(0) 推荐(0)
摘要:14.2.1 创建一个线程 实例化一个 对象,然后调用它的Start方法,就可以创建和启动一个新的线程。最简单的 构造方法是接受一个 代理:一个无参方法,表示执行开始位置。 示例: c static void Main(string[] args) { Thread t = new Thread(W 阅读全文
posted @ 2017-07-24 22:46 【唐】三三 阅读(433) 评论(0) 推荐(0)
摘要:C 发送邮件 http://www.cnblogs.com/akwwl/p/3191713.html 问题: 关于QQ邮箱“命令顺序不正确。 服务器响应为:Error: need EHLO and AUTH first !”问题 使用SmtpClient来解决 EnableSsl设置为true Us 阅读全文
posted @ 2017-07-19 10:20 【唐】三三 阅读(165) 评论(0) 推荐(0)
摘要:使用的佳博GP 5890XIII http://www.cnblogs.com/lovenan/p/3217448.html 阅读全文
posted @ 2017-07-18 16:39 【唐】三三 阅读(2093) 评论(0) 推荐(0)
摘要:实例: c static void Main(string[] args) { Thread t = new Thread(WriteY); //创建一个新线程 t.Start(); //启动线程 WriteY //同时,主线程也会执行。 for (int i = 0; i 阅读全文
posted @ 2017-07-14 09:49 【唐】三三 阅读(1145) 评论(0) 推荐(0)