• 博客园logo
  • 会员
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • HarmonyOS
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
老司机快发车
记录自己遇到的一些问题,以便后期查看
博客园    首页    新随笔    联系   管理    订阅  订阅

随笔分类 -  .NET

C# 简单日志实现

摘要:1、 using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.IO; namespace Chan 阅读全文
posted @ 2021-05-06 14:57 老司机快发车 阅读(344) 评论(0) 推荐(0)
C# 利用反射把DataTable转为List

摘要:using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Data; using System.Reflection; using System.Componen 阅读全文
posted @ 2021-05-06 14:53 老司机快发车 阅读(137) 评论(0) 推荐(0)
C# 下载文本文件乱码

摘要:if (File.Exists(filePath)) { FileInfo fi = new FileInfo(filePath); context.Response.Clear(); context.Response.ClearHeaders(); context.Response.Buffer 阅读全文
posted @ 2021-05-06 14:50 老司机快发车 阅读(449) 评论(0) 推荐(0)
C# 导出Excel的几种简单方法

摘要:1. \t 格式导出 string reStr = "{0}\t{1}\t{2}"; StringWriter sw = new StringWriter(); sw.WriteLine(reStr, "车辆编号", "车牌号", "发动机号"); sw.Close(); string fileNa 阅读全文
posted @ 2021-05-06 14:49 老司机快发车 阅读(1568) 评论(0) 推荐(0)
C# 写入文件是否包含BOM头

摘要:在c#中向一个文件中写入数据时经常会调用 StreamWriter writer = new StreamWriter(filePath, false, Encoding.UTF8); 后一个参数决定了数据编码。 但是这样写入的文件数据会包含BOM头,好多编辑器无法识别格式。 去除BOM头的方法是: 阅读全文
posted @ 2021-05-06 14:47 老司机快发车 阅读(221) 评论(0) 推荐(0)
DLL强签名

摘要:1、强签名 <configuration> <runtime> <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"> <dependentAssembly> <assemblyIdentity name="Newtonsoft.Json 阅读全文
posted @ 2021-05-06 14:37 老司机快发车 阅读(160) 评论(0) 推荐(0)
C# Fleck SSL加密

摘要://location:websocket监听地址(wss) WebSocketServer server = new WebSocketServer(location); //添加证书(certificatePath:证书路径,password:访问证书数据所需的密码) server.Certificate = new System.Security.Cryptography.X509Certi... 阅读全文
posted @ 2019-05-24 16:43 老司机快发车 阅读(1684) 评论(1) 推荐(0)
Quartz.NET V2.6.2版本简单使用

摘要:一、Nuget安装命令 Install-Package Quartz -Version 2.6.2 二、代码实现 Program.cs using System; using System.Collections.Generic; using System.Linq; using System.Te 阅读全文
posted @ 2018-11-23 17:03 老司机快发车 阅读(1585) 评论(0) 推荐(2)

博客园  ©  2004-2025
浙公网安备 33010602011771号 浙ICP备2021040463号-3