随笔分类 -  C#

摘要:C#多线程和异步(一)——基本概念和使用方法 - 捞月亮的猴子 - 博客园 (cnblogs.com) [C#.NET 拾遗补漏]12:死锁和活锁的发生及避免 - 精致码农 - 博客园 (cnblogs.com) C#(99):多线程锁:Mutex互斥体,Semaphore信号量,Monitor监视 阅读全文
posted @ 2021-08-31 17:07 Kyle0418 阅读(90) 评论(0) 推荐(0) 编辑
摘要:First, add the dll to Reference and set Copy Local to False. Then create a new project folder "libs", copy the referenced dll into this folder, and se 阅读全文
posted @ 2020-06-29 13:58 Kyle0418 阅读(206) 评论(0) 推荐(0) 编辑
摘要:private void button1_Click(object sender, EventArgs e) { Image myImage = Image.FromFile(@"D:\pic\original.jpg", true); SaveImg(@"D:\pic\reduced.jpg", 阅读全文
posted @ 2020-06-04 17:12 Kyle0418 阅读(706) 评论(0) 推荐(0) 编辑
摘要:通过代码实现Win+D,Win+E等等,可以参考以下代码: [DllImport("User32.dll")] public static extern void keybd_event(Byte bVk, Byte bScan, Int32 dwFlags, Int32 dwExtraInfo); 阅读全文
posted @ 2020-04-20 14:26 Kyle0418 阅读(230) 评论(0) 推荐(1) 编辑
摘要:基本用法(CRUD) 1.插入: 2.修改: 3.查询: 4.删除: 获取主键: 阅读全文
posted @ 2019-05-22 14:13 Kyle0418 阅读(167) 评论(0) 推荐(0) 编辑
摘要:以下例子获取每个月的第四个星期五 结果: 阅读全文
posted @ 2019-04-26 17:05 Kyle0418 阅读(220) 评论(0) 推荐(0) 编辑
摘要:// Define entity classes [Table(Name = "CAR")] public class CARclass { [Column(Name = "Id")] public int Id { get; set; } [Column(Name = "Model")] publ 阅读全文
posted @ 2019-04-19 15:14 Kyle0418 阅读(359) 评论(0) 推荐(0) 编辑
摘要:public static DataTable OpenCSV(string filePath) { DataTable dt = new DataTable(); FileStream fs = new FileStream(filePath, System.IO.FileMode.Open, S 阅读全文
posted @ 2019-03-21 16:25 Kyle0418 阅读(327) 评论(0) 推荐(1) 编辑
摘要:C# Code: string xmlPath = "D:\\test.xml"; XmlDocument xmlDoc = new XmlDocument(); xmlDoc.Load(xmlPath); // Save namespace uri string msoUri = "http:// 阅读全文
posted @ 2019-02-20 14:04 Kyle0418 阅读(864) 评论(0) 推荐(0) 编辑
摘要:C# 利用反射动态创建对象——带参数的构造函数和String类型 C# 把类实例保存到文件里(类的序列化和反序列化) C# WinForm获取 当前执行程序路径的几种方法 阅读全文
posted @ 2018-12-27 14:08 Kyle0418 阅读(114) 评论(2) 推荐(0) 编辑
摘要:Result: 阅读全文
posted @ 2018-12-18 16:36 Kyle0418 阅读(173) 评论(2) 推荐(0) 编辑
摘要:dynamic MyDynamic = new System.Dynamic.ExpandoObject(); MyDynamic.A = "A"; MyDynamic.B = "B"; MyDynamic.C = "C"; MyDynamic.Number = 12; MyDynamic.MyMe 阅读全文
posted @ 2018-12-18 16:34 Kyle0418 阅读(771) 评论(1) 推荐(1) 编辑
摘要:NuGet: ByteScout PDF SDK https://bytescout.com/products/developer/pdfextractorsdk/convert-pdf-to-excel-xls 阅读全文
posted @ 2018-12-14 17:41 Kyle0418 阅读(138) 评论(0) 推荐(0) 编辑
摘要:1.使用 NuGet 安装 System.Data.SQLite 2.在 App.config 中配置连接字符串 3.简单使用 阅读全文
posted @ 2018-12-10 17:45 Kyle0418 阅读(645) 评论(0) 推荐(0) 编辑
摘要:Download link: FFmpeg Builds 阅读全文
posted @ 2018-11-23 16:49 Kyle0418 阅读(1462) 评论(1) 推荐(0) 编辑
摘要:获取 bin 同级文件夹 assets 中的 test.html 其中 AppDomain.CurrentDomain.BaseDirectory 的值为 阅读全文
posted @ 2018-11-22 15:49 Kyle0418 阅读(170) 评论(0) 推荐(0) 编辑
摘要:Here is the conversion code: Before using it, you need to add "DocumentUltimate" from "NuGet". The specific operation is as follows: Right click the R 阅读全文
posted @ 2018-11-21 17:01 Kyle0418 阅读(536) 评论(0) 推荐(1) 编辑
摘要:遍历文件夹和文件 获取目录下的文件和子目录(不递归目录,支持通配符查找) 获取指定文件信息 复制文件夹下所有内容 获取文件夹大小 阅读全文
posted @ 2018-11-21 16:52 Kyle0418 阅读(885) 评论(0) 推荐(0) 编辑
摘要:1.使用Stopwatch 2.使用DateTime 3.调用API 4.利用Thread的UserProcessorTime 阅读全文
posted @ 2018-11-21 09:11 Kyle0418 阅读(284) 评论(3) 推荐(1) 编辑
摘要:1.Invoke 在主线程中会出现 1 秒钟的阻塞,因为 Invoke 是同步的,而不是创建新线程。 2.BeginInvoke BeginInvoke 会在新线程中执行,并且不会对主线程产生租塞,同时它可以获取自己的返回值,使用EndInvoke实现。 Delegate.BeginInvoke 方 阅读全文
posted @ 2018-11-16 17:00 Kyle0418 阅读(248) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示