随笔分类 -  .NET

C# Framework
摘要:static、readonly、volatile 阅读全文
posted @ 2020-09-27 10:43 wesson2019 阅读(144) 评论(0) 推荐(0)
摘要:SendMessage PostMessage 阅读全文
posted @ 2020-09-24 18:03 wesson2019 阅读(833) 评论(0) 推荐(0)
摘要:Hook 阅读全文
posted @ 2020-09-17 19:09 wesson2019 阅读(333) 评论(0) 推荐(0)
摘要:Visual Studio 快捷键 阅读全文
posted @ 2020-09-16 16:27 wesson2019 阅读(146) 评论(0) 推荐(0)
摘要:C:\Users\root\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup目录 @echo off ::开机自启动 ::本脚本存在在需要运行的微服务文件夹同级目录中 start "%serviceName%" dotnet 阅读全文
posted @ 2020-09-08 19:06 wesson2019 阅读(527) 评论(0) 推荐(0)
摘要:demo echo test call writeline "111" 2 call writeline "222" echo test writeline.bat :writeline <"str"> <attr> if "%2"=="" ( call ColorStr 0c 3 "%1" 1 2 阅读全文
posted @ 2020-09-07 18:44 wesson2019 阅读(3203) 评论(0) 推荐(0)
摘要:在.NET的框架之内定时器有以下几种,各自的特点是: ## System.Windows.Forms.Timer * System.Windows.Forms.Timer (仅 .NET Framework),这是一个触发事件并定期在一个或多个事件接收器中执行代码的 Windows 窗体组件。 组件 阅读全文
posted @ 2020-08-31 11:24 wesson2019 阅读(2017) 评论(0) 推荐(0)
摘要:对象 属性 展示 显示 层级 阅读全文
posted @ 2020-08-28 18:00 wesson2019 阅读(507) 评论(0) 推荐(0)
摘要:IEnumerable,ICollection,IList,List 阅读全文
posted @ 2020-08-26 23:03 wesson2019 阅读(134) 评论(0) 推荐(0)
摘要:Task 阅读全文
posted @ 2020-08-11 20:36 wesson2019 阅读(431) 评论(0) 推荐(1)
摘要:Thread,ThreadPool 阅读全文
posted @ 2020-08-11 20:35 wesson2019 阅读(243) 评论(0) 推荐(0)
摘要:字符串比较 // 忽略大小写,使用当前区域性 String.Compare(str1, str2, true, null); string.Compare(i.BinCode, "Good", true, System.Globalization.CultureInfo.CurrentCulture 阅读全文
posted @ 2020-08-07 10:49 wesson2019 阅读(778) 评论(0) 推荐(0)
摘要:在 C# 中,new 关键字可用作运算符、修饰符或约束。 1)new 运算符:用于创建对象和调用构造函数。 2)new 修饰符:在用作修饰符时,new 关键字可以显式隐藏从基类继承的成员。重新定义属性,方法等。 3)new 约束:用于在泛型声明中约束可能用作类型参数的参数的类型。 类型参数的约束,必 阅读全文
posted @ 2020-07-30 19:38 wesson2019 阅读(137) 评论(0) 推荐(0)
摘要:/// <summary> /// 高性能 计时器:统计功能耗时ms /// </summary> public class HiPerfTimer { [System.Security.SuppressUnmanagedCodeSecurity] [System.Runtime.InteropSe 阅读全文
posted @ 2020-07-20 18:11 wesson2019 阅读(174) 评论(0) 推荐(0)
摘要:MAC地址 94:C6:91:71:9D:39 /// <summary> /// MAC地址 /// </summary> /// <returns></returns> public static string GetPcMac() { ManagementObjectSearcher mos 阅读全文
posted @ 2020-04-27 18:09 wesson2019 阅读(332) 评论(0) 推荐(0)
摘要:IDisposable 阅读全文
posted @ 2020-04-24 15:17 wesson2019 阅读(163) 评论(0) 推荐(0)
摘要:删除操作 data.RemoveAll(x = x.Key == " "); 阅读全文
posted @ 2020-04-20 17:04 wesson2019 阅读(87) 评论(0) 推荐(0)
摘要:bat操作 文件格式 ::采用ANSI编码或UTF-8强制设置 @echo off chcp 65001 set dd=%date% set tt=%time% ::取星期: echo %dd:~10,6% set tt1=%dd:~0,4%%dd:~5,2%%dd:~8,2%-%tt:~0,2%% 阅读全文
posted @ 2020-03-13 15:28 wesson2019 阅读(612) 评论(0) 推荐(0)
摘要:`````` 阅读全文
posted @ 2020-01-20 17:22 wesson2019 阅读(277) 评论(0) 推荐(0)
摘要:Console.WriteLine("Ports:"); foreach (var item in SerialPortService.SerialPortNames) { Console.Write("\t{0}", item); } Console.WriteLine(); SerialPort 阅读全文
posted @ 2020-01-20 16:26 wesson2019 阅读(665) 评论(0) 推荐(0)