随笔分类 - C#
摘要:原文:https://www.jianshu.com/p/ff16a7da6de0 1、vs添加类库,编写如下代码,生成dll 1 using System; 2 using System.Collections.Generic; 3 using System.Linq; 4 using Syste
阅读全文
摘要:有时需要将内存中的表与数据库中的表比较,比如Datatable中有100行数据,需要判断在数据库中是否存在,这个时候我们就可以使用sqlserver中的【用户 定义表类型】 这里最最最重要的思路是把【用户 定义表类型】当作一张虚拟的正常表去处理 需求:现在内存中有个Datatable,数据库中有张表
阅读全文
摘要:1 /// 2 /// 数据库通用操作类 3 /// 4 public abstract class DbHelper 5 { 6 #region " 连接字符串 " 7 //连接字符串 8 //public static string ConnString = C...
阅读全文
摘要:原文链接:https://www.cnblogs.com/Ehtan/p/4361986.html#undefined 添加COM引用: Microsoft Script Control 1.0 1、添加帮助类 2、测试代码
阅读全文
摘要:1、新建项目 选中windows服务 2、添加安装程序 3、修改安装代码 4、重新生成项目 5、新建bat文件(安装服务.bat) 注意: 1、cd "G:\WindowsServiceTest\WindowsServiceTest\bin\Debug" 路径为项目的路径 2、InstallUtil
阅读全文
摘要:当我们对一个json数组进行反序列化用Newtonsoft.Json.JsonConvert.DeserializeObject() 通常会报此错误Newtonsoft.Json.dll 中发生,但未在用户代码中进行处理其他信息: Cannot deserialize the current JSO...
阅读全文
摘要:httpPost 方式发送请求 不带参数 1 /// 2 /// 没有参数的post请求 3 /// 4 public void HttpPostNoParam() 5 { 6 strin...
阅读全文
摘要:1 2 3 using System; 4 using System.Collections; 5 using System.Collections.Generic; 6 using System.Drawing; 7 using System.Drawing.Drawing2D; 8 using System.Threading; 9 using Sys...
阅读全文