摘要:windows下设置开机自动运行批处理脚本 创建或准备bat批处理文件 使用快捷键,win+r 输入:gpedit.msc进入本地策略管理器 点击windows设置下的脚本(启动/关机),然后双击启动 点击添加,然后点击浏览,选择批处理文件然后确定就可以了 批处理文件内容: 启动服务 卸载服务
阅读全文
随笔分类 - 003 C# / 003 C#杂记
用于记录平时工作杂记总结
摘要:windows下将可执行exe设置为--开机自动运行程序 选中可执行程序(.exe)==》右键创建快捷方式 使用快捷键,win+r 输入: shell:startup 打开[启动文件夹]之后,将需要设置开机自启动的软件程序的快捷方式放入文件夹 电脑开机或者重启时,该【启动文件夹】下的软件则会自动开启
阅读全文
摘要:using System; class Program { static void Main() { Console.WriteLine(AreAnagrams("CCAA", "CAAC")); Console.WriteLine(AreAnagrams("CARE", "RACE")); } s
阅读全文
摘要:using System; using System.Collections.Generic; using System.Linq; using System.Runtime.CompilerServices; using System.Text; using System.Windows.Form
阅读全文
摘要:LvLogHelper.GetInstance(this.lbLog).PrintLog("初始化程序完成"); LvLogHelper.GetInstance().PrintLog("请连接综测仪表"); LvLogHelper.GetInstance().PrintLog("请加载测试用例");
阅读全文
摘要:当期环境:Win11家庭版 注:批处理文件编码方式需设置为ANSI 启动服务: @echo off >nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system" if '%errorlevel%'
阅读全文
摘要:using System; using System.Collections.Generic; using System.ComponentModel; using System.Drawing; using System.Linq; using System.Reflection; using S
阅读全文
摘要:using System; using System.Diagnostics; using System.IO; using System.Text; namespace MD5Helper.Helper { public class MD5Helper { //定义一个用于保存静态变量的实例 pr
阅读全文
摘要:参考:https://www.656463.com/wenda/ybcfssysjgshCdm_568 用于对代码生成工具生成的代码——进行格式化操作(VS:Ctrl + k +D) 使用方式|操作步骤: 第一步:准备需要格式化的代码 第二步:使用Nuget安装Microsoft.CodeAnaly
阅读全文
摘要:/// 进程:程序在服务器上运行是,占据的计算资源合集,称之为进程; /// 进程之间不会相互干扰--进程之间的通信比较困难(分布式)/// 线程:程序执行的最小单位,相应操作的最小执行流/// 线程也包含自身的计算资源/// 线程是属于进程的,一个进程可包含多个线程/// 多线程:一个进程里,有多
阅读全文
摘要:简单理解C#委托事件,示例如下所示: using System; /// <summary> /// 委托步骤 /// 第一步:声明委托 /// 第二步:委托使用方法的实现 /// 第三步:委托的解释(将方法以变量的形式传递,且以方法的形式执行)--方法与委托建立联系 /// 注: /// 委托链的
阅读全文
摘要:注:以下代码仅供参考使用,实际使用过程,应根据实际场景--进行提取重构,提升复用效率...... 简单理解,反射应用于加载动态库DLL,解析其内部实现....... 示例如下所示:注,该代码基于.NET 5 运行效果如下所示: using System; using System.Reflectio
阅读全文
摘要://注:对于读取/写入文件操作时,需判断当前文件是否存在 using System.IO; using System.Text; namespace Callno.Common { public class FileHelper { //定义一个用于保存静态变量的实例 private static
阅读全文
摘要:1.计算指定时间区间长度--分钟 2.根据指定时间区间获取天 3.根据指定区间获取月 4.根据指定区间获取年 记录一下,防止后续使用........................ using System; using System.Collections.Generic; namespace M
阅读全文
摘要:Navicat for mysql 根据表结构生成C# 实体对象 USE INFORMATION_SCHEMA; SELECT CONCAT('/// <summary>\r\n/// ',COLUMN_COMMENT,'\r\n/// </summary>\r\npublic ', CASE DA
阅读全文
摘要:C# 合并PDF文件 using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Text; using System.Threading.Tasks; using
阅读全文
摘要:List<Model> strList = new List<Model>() { new Model(){Id=1,Name = "张三"}, new Model(){Id=11,Name = "张三1"}, new Model(){Id=2,Name = "李四"}, new Model(){I
阅读全文
摘要:public class Model { public int Id { get; set; } public string Name { get; set; } } private static List<Model> LinqIn() { List<Model> strList = new Li
阅读全文
摘要:class Test { public string Name { get; set; } public int Age { get; set; } } List<Test> list = new List<Test>(); list.Add(new Test { Name = "张三", Age
阅读全文
摘要:第一步:使用Nuget包管理器安装NPOI 第二步:如下所示 using NPOI.HSSF.UserModel; using NPOI.SS.UserModel; using NPOI.XSSF.UserModel; using System; using System.Collections.G
阅读全文