posts - 609,  comments - 13,  views - 64万
< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

随笔分类 -  .NET

.net core Razor 全球化和本地化 多语言
摘要:1.根目录建文件夹:Resource(存放资源文件) 和 ResourceClass(存放对应的空白类文件)2.添加资源文件到Resource文件夹中:Language.en-US.resx 和 Language.zh-CN.resx 打开资源文件,添加配置项,例如 中文资源文件 名称:Welcom 阅读全文
posted @ 2023-03-29 15:05 邢帅杰 阅读(190) 评论(0) 推荐(0) 编辑
c#启动EXE文件
摘要:xxx来源:http://t.zoukankan.com/TBW-Superhero-p-5570650.htmlhttp://t.zoukankan.com/flywing-p-10570063.html #region 安装程序 try { //D:\Demos\ConsoleApp1\Cons 阅读全文
posted @ 2022-12-30 10:08 邢帅杰 阅读(271) 评论(0) 推荐(0) 编辑
gzip字符串压缩,解压缩
摘要:xx using System.IO.Compression; public class StringCompress { /// <summary> /// 字符串压缩 /// </summary> /// <param name="strSource"></param> /// <returns 阅读全文
posted @ 2022-12-10 12:31 邢帅杰 编辑
读写CSV文件
摘要:来源:https://www.cnblogs.com/lxhbky/p/12219080.html using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Ref 阅读全文
posted @ 2022-09-29 15:47 邢帅杰 阅读(44) 评论(0) 推荐(0) 编辑
VS2022/VS2019安装WinForm打包程序,Microsoft Visual Studio Installer Projects 2022下载(网盘下载),Installer Projects 2019下载,图标库,VS2022打包程序添加步骤,打包程序.Net Framework版本选择
摘要:问题:使用VS2022创建WinForm程序,完了需要打包成安装程序,这时候我去下载Microsoft Visual Studio Installer Projects 2022插件,速度超级慢,恶心人。总算是下载下来了,我存到我的网盘上面了,下载链接,速度快点:https://pan.baidu. 阅读全文
posted @ 2022-09-29 10:33 邢帅杰 阅读(1533) 评论(1) 推荐(1) 编辑
.net使用PLinq并行查询提升查询效率,List.AsParallel(),ForAll()替换Foreach
摘要:参考:https://docs.microsoft.com/zh-cn/dotnet/standard/parallel-programming/introduction-to-plinq var source = Enumerable.Range(1, 10000); // Opt in to P 阅读全文
posted @ 2022-08-05 16:21 邢帅杰 阅读(255) 评论(0) 推荐(0) 编辑
.NET CORE全局异常处理(自定义过滤器 ExceptionFilterAttribute、自定义中间件)配合log4net写日志
摘要:1、自定义中间件处理异常(推荐) 参考:https://www.csframework.com/archive/1/arc-1-20211230-4180.htm using System.Net; using System.Text.Json; using ExceptionHandling.Mo 阅读全文
posted @ 2022-07-25 21:26 邢帅杰 阅读(646) 评论(0) 推荐(0) 编辑
RabbitMQ、ErLang下载、RabbitMQ下载
摘要:最新资源2022-07-01RabbitMQ下载链接:https://pan.baidu.com/s/1VBbH40EvY46jNRdiKYhFuw 提取码:bcuq 版本 rabbitmq-server-3.10.5.exeErLang下载链接:https://pan.baidu.com/s/14 阅读全文
posted @ 2022-06-30 14:01 邢帅杰 阅读(712) 评论(0) 推荐(0) 编辑
Dapper用法
摘要:参考:https://www.cnblogs.com/atomy/p/12784361.htmlDapper存储过程:http://t.zoukankan.com/mengshi-p-4784640.html using Dapper; using System.Collections.Generi 阅读全文
posted @ 2022-06-23 13:22 邢帅杰 阅读(71) 评论(0) 推荐(0) 编辑
.NET Core连接数据库,.Net Core连接Mysql数据库
摘要:DbContext:这里设置自定义连接字符串的写法过时了。参考连接MySql的写法。 using Microsoft.EntityFrameworkCore; using Microsoft.Extensions.Configuration; using System; using WebApi.M 阅读全文
posted @ 2021-10-08 13:29 邢帅杰 阅读(603) 评论(0) 推荐(0) 编辑
migration
摘要:EF命令Update-Database -Script -SourceMigration:"201901210832533_addTemporaryAttendanceDetail20190121.cs" -TargetMigration:"201902282225506_updatetableCo 阅读全文
posted @ 2021-06-10 16:51 邢帅杰 阅读(357) 评论(0) 推荐(0) 编辑
Fody is only supported on MSBuild 16 and above
摘要:.net framework版本是4.6.1,所以不能安装高版本的fody,降级fody解决:可以在VS的程序包管理器控制台中输入Install-Package Fody -Version 4.2.1来安装4.2.1版本的Fody,然后输入Install-Package Costura.Fody - 阅读全文
posted @ 2021-01-07 16:57 邢帅杰 阅读(656) 评论(0) 推荐(0) 编辑
.NET Core使用缓存
摘要:1.MemoryCache 服务器端缓存添加服务:services.AddMemoryCache();使用:注入IMemoryCache _memoryCache; var cityList = new List<City>(); if (!_memoryCache.TryGetValue("cit 阅读全文
posted @ 2020-10-22 10:06 邢帅杰 阅读(305) 评论(0) 推荐(0) 编辑
蓝牙开发
摘要:代码: private void button1_Click(object sender, EventArgs e) { try { using (BluetoothClient client = new BluetoothClient()) { BluetoothDeviceInfo[] devi 阅读全文
posted @ 2020-09-07 17:01 邢帅杰 阅读(227) 评论(0) 推荐(0) 编辑
Unable to load the specified metadata resource
摘要:本地运行都正常,就是发布到服务器上不行,查找了一些文章,都没解决我的问题,后来发现是路径不对和文件缺失。 原来的配置文件中是这样的: <add name="TRidentityEntities" connectionString="metadata=res://*/TRidentityModel.c 阅读全文
posted @ 2019-07-02 14:30 邢帅杰 阅读(1457) 评论(0) 推荐(0) 编辑
生成二维码、条形码、带logo的二维码
摘要:Nuget安装ZXing.Net,帮助类: using System; using System.Collections.Generic; using System.Drawing; using System.Drawing.Imaging; using ZXing; using ZXing.Com 阅读全文
posted @ 2019-03-18 10:03 邢帅杰 阅读(569) 评论(0) 推荐(0) 编辑
Win10下windows mobile device center设备中心连接不上无法启动
摘要:微软Win10自动更细补丁后windows mobile设备中心就无法启动了 需要重新启动相关的服务并授予 本机登录用户 权限 1.点击屏幕左下角“开始”图标,点击“运行”,在弹出的输入框中输入“services.msc”按下回车键。 2.在弹出的界面中,找到“基于Windows Mobile 20 阅读全文
posted @ 2019-01-17 11:38 邢帅杰 阅读(5789) 评论(0) 推荐(0) 编辑
winform使用PrintDocument控件打印以及oledb驱动
摘要:代码,需要加入的控件:PrintDocument、PageSetupDialog、PrintDialog、PrintPreviewDialog、BackgroundWorker,控件的Document属性要指定为PrintDocument控件的id。导入Excel用的是12.0的驱动,需要下载:ht 阅读全文
posted @ 2019-01-04 12:34 邢帅杰 阅读(841) 评论(0) 推荐(0) 编辑
下载网络资源-带下载进度
摘要:带进度 http://t.zoukankan.com/h82258652-p-10950580.html namespace AppUtils { public struct HttpDownloadProgress { public long BytesReceived { get; set; } 阅读全文
posted @ 2018-12-29 12:58 邢帅杰 阅读(149) 评论(0) 推荐(0) 编辑
VSCode的使用
摘要:前后端分离的,先打开vs,打开你的项目,在项目根目录中找到.vs文件加,找到.vs\config\applicationhost.config,然后打开找到你项目的IIS Express配置,例如:<site name="TestPro.Web" id="2"> <application path= 阅读全文
posted @ 2018-12-21 17:45 邢帅杰 阅读(897) 评论(0) 推荐(0) 编辑

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