![](https://img-blog.csdnimg.cn/20201014180756780.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
C#
王焜棟琦
这个作者很懒,什么都没留下…
展开
-
解决NewtonSoft.Json版本冲突
解决NewtonSoft.Json版本冲突原创 2024-05-15 14:26:49 · 732 阅读 · 0 评论 -
C#关闭程序 CefSharp.BrowserSubprocess.exe,执行控制台命令
关闭程序 CefSharp.BrowserSubprocess.exe原创 2024-03-15 14:27:30 · 1051 阅读 · 0 评论 -
Aspose.Words指定位置插入table
Aspose.Words指定位置插入table原创 2024-03-11 14:45:43 · 495 阅读 · 0 评论 -
System.DllNotFoundException: 无法加载 DLL“epen.dll”: 找不到指定的模块,Visual C++ Redistributable下载地址
System.DllNotFoundException: 无法加载 DLL“epen.dll”: 找不到指定的模块,Visual C++ Redistributable下载地址原创 2024-01-29 15:31:25 · 156 阅读 · 0 评论 -
Aspose.Words设置边距
Aspose.Words设置边距原创 2024-01-25 14:48:20 · 439 阅读 · 0 评论 -
C#获取当前运行时环境信息
【代码】C#获取当前运行时环境信息。原创 2024-01-25 14:40:20 · 817 阅读 · 0 评论 -
c#企业微信上传的文件丢失格式,pdf不能预览,errcode:44001
c#企业微信上传的文件丢失格式,pdf不能预览,errcode:44001原创 2024-01-23 16:28:37 · 894 阅读 · 0 评论 -
System.IO.InvalidDataException: Missing content-type boundary.
使用HttpClient上传文件报错:System.IO.InvalidDataException: Missing content-type boundary.原创 2024-01-18 17:52:08 · 628 阅读 · 0 评论 -
C# Stream文件流转字节
【代码】Stream文件流转字节。原创 2024-01-17 15:23:12 · 679 阅读 · 0 评论 -
企业微信上传临时素材errcode:44001,errmsg:empty media data
企业微信上传临时素材{"errcode":44001,"errmsg":"empty media data [logid:]"}原创 2024-01-16 18:42:05 · 1580 阅读 · 3 评论 -
System.UnauthorizedAccessException: Access to the registry key ‘Global‘ is denied
System.UnauthorizedAccessException: Access to the registry key 'Global' is denied原创 2023-12-25 16:10:34 · 1240 阅读 · 0 评论 -
HttpClient未能为 SSL/TLS 安全通道建立信任关系,忽略SSL验证
【代码】HttpClient未能为 SSL/TLS 安全通道建立信任关系。原创 2023-12-22 15:51:13 · 1573 阅读 · 0 评论 -
C#检测是否在单元测试环境
C#检测是否在单元测试环境原创 2023-09-12 15:39:08 · 69 阅读 · 0 评论 -
C#给DateTime?赋值为null,赋值为空
C#给DateTime?赋值为null,赋值为空原创 2023-08-23 11:22:28 · 1190 阅读 · 0 评论 -
c#防止事件重复注册,调用后就移除注册,跨程序集的事件订阅
【代码】c#防止事件重复注册,调用后就移除注册,跨程序集的事件订阅。原创 2023-08-16 15:00:04 · 545 阅读 · 0 评论 -
C#制作打包安装程序,安装程序类使用
C#制作打包安装程序,安装程序类使用原创 2023-07-10 18:23:20 · 4689 阅读 · 0 评论 -
C#终止休眠的Task
C#终止休眠的线程,Task原创 2023-06-01 17:06:18 · 445 阅读 · 0 评论 -
Cannot load ClearScript V8 library. Load failure information for ClearScriptV8.win-x64.dll
Cannot load ClearScript V8 library. Load failure information for ClearScriptV8.win-x64.dll解决原创 2023-05-22 14:00:00 · 627 阅读 · 0 评论 -
雪花id在前端js超限,损失了精度,改造为生成15位
雪花id在js损失精度,超过限制,改造为15位原创 2023-05-19 16:23:53 · 640 阅读 · 0 评论 -
.NET使用依赖注入,控制反转
.net依赖注入,控制反转原创 2023-04-12 14:13:42 · 988 阅读 · 0 评论 -
EF core针对数据库的函数映射,日期函数比较日期差值
EF core针对数据库的函数映射,日期函数比较日期差值原创 2023-04-10 14:45:01 · 79 阅读 · 0 评论 -
C#防止事件重复注册
C#防止事件重复注册原创 2023-03-28 14:58:52 · 385 阅读 · 0 评论 -
No data is available for encoding 936. For information on defining a custom encoding, see the docume
No data is available for encoding 936. For information on defining a custom encoding, see the documentation for the Encoding.RegisterProvider method.原创 2023-02-21 11:17:46 · 1081 阅读 · 0 评论 -
C#使用操作系统默认程序打开pdf,支持.NET Core跨平台,无视平台差异
C#使用操作系统默认程序打开pdf,支持.NET Core跨平台,无视平台差异。转载 2023-01-08 12:13:59 · 1155 阅读 · 1 评论 -
Aspose.Cells设置单元格背景色
【代码】Aspose.Cells设置单元格背景色。原创 2023-01-04 15:39:01 · 1164 阅读 · 0 评论 -
C#雪花算法生成id
【代码】C#雪花算法生成id。原创 2022-10-19 15:47:40 · 2498 阅读 · 0 评论 -
Aspose.Words.FileCorruptedException: The document appears to be corrupted and cannot be loaded
Unhandled exception. Aspose.Words.FileCorruptedException: The document appears to be corrupted and cannot be loaded原创 2022-09-22 15:12:07 · 2305 阅读 · 0 评论 -
DataTable分页
【代码】DataTable分页。原创 2022-09-22 11:14:53 · 844 阅读 · 0 评论 -
C#生成MD5签名字符串
MD5签名,MD5加密原创 2022-09-05 16:03:43 · 808 阅读 · 0 评论 -
DataTable排序
DataTable dataTable = new DataTable();dataTable.Columns.Add("id");dataTable.Columns.Add("name");dataTable.Columns.Add("weight");dataTable.Columns.Add("birthday");dataTable.Rows.Add(new object[]{ "1","欧阳修","56",DateTime.Parse("1992-02-26")});dataTable原创 2022-05-20 17:13:17 · 8494 阅读 · 0 评论 -
C#匿名委托递归,部门树形
递归。部门树形原创 2022-05-14 12:48:20 · 451 阅读 · 0 评论 -
DataTable中DataRow检查重复记录,去重复
foreach (DataRow row in DataTable1.Rows) { DataRow dataRow = DataTable2.NewRow(); dataRow.ItemArray = row.ItemArray; //检查记录重复了?2022-5-6 09:29:01 DataTable2.PrimaryKey =new DataColumn[] { DataTable2.Columns[0] }; bool .原创 2022-05-06 09:49:30 · 1399 阅读 · 0 评论 -
DataTable中的DataRow行数据复制给另一个DataTable表
将dataDt1的行数据复制给newDt2中DataTable dataDt1=new DataTable();DataTable newDt2=new DataTable(); foreach (DataRow row in dataDt1.Rows){ DataRow dataRow = newDt2.NewRow(); dataRow.ItemArray = row.ItemArray; newDt2.Rows.InsertAt(dataRow, 0);} ...原创 2022-04-27 15:18:33 · 2626 阅读 · 0 评论 -
用Task多线程操作C#T4生成代码,抛出System.ObjectDisposedException: 已关闭 Safe handle
抛出的异常:ErrorGeneratingOutputD:\Work\wanghaoli.Kalman.Studio\Kalman.Studio\src\Kalman.Studio\bin\Debug\T4Template\whl实体2.tt(-1,-1) : error : An Exception was thrown while processing the template.The following Exception was thrown:System.ObjectDisposedExc原创 2022-01-07 16:16:09 · 728 阅读 · 0 评论 -
CefSharp截取完整网页图片,网页截图
代码截取完整网页图片,网页截图原创 2021-12-03 15:25:29 · 3550 阅读 · 2 评论 -
C#正则查找字符串是否包含字母
string gg = "789546";//如果count大于0表示有字母int count=System.Text.RegularExpressions.Regex.Matches(gg,"[a-zA-z]").Count;原创 2021-11-11 17:18:12 · 1066 阅读 · 0 评论 -
C#根据通配符匹配指定目录下的文件
string dir = @"G:\Desktop\天气数据抓取\所有城市天气数据\Bangkok"; //目录下所有文件IEnumerable<string> files = System.IO.Directory.EnumerateFileSystemEntries(dir);//根据通配符匹配指定目录下的文件,此句找到文件1_20160601.xlsstring[] fileArr= System.IO.Directory.GetFiles(dir,"*_20160601.原创 2021-11-04 22:59:43 · 1010 阅读 · 0 评论 -
C#带cookie发送http请求,http请求带cookie
/// <summary>/// 请求(正在计划)的接口数据/// </summary>private static void GetData(string loginSessionCookie){ Console.WriteLine("请求数据的cookie=" + loginSessionCookie); LogHelpter.AddLog("请求数据的cookie=" + loginSessionCookie); //所有段 string url = "ht原创 2021-10-29 09:16:43 · 2044 阅读 · 0 评论 -
C#下载文件
WebClient webClient = new WebClient();string url = "http://192.168.1.171:8061/upload/img/2021_10/52e3b669fb594c2680c4524389b52324.jpg";string dir = AppDomain.CurrentDomain.BaseDirectory + "cache\\";if (!System.IO.Directory.Exists(dir)){ System.IO.Di原创 2021-10-13 14:31:20 · 102 阅读 · 0 评论 -
C#复制文件夹下的所有文件、目录到指定的文件夹
//功用:文件操作帮助类//作者:wanghaoli//创建时间:2021-10-11 16:22:17using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;namespace WebMvcNetCore.TuShi.FenGong.Model.Tool{ /// <summary> ///原创 2021-10-11 17:08:48 · 4745 阅读 · 2 评论