摘要: 约束泛型 代码: namespace Demo5 { class Program { static void Main(string[] args) { int number = 20210527; string str = "Hello,2021-05-27"; //MyTest1传入参数类型必须 阅读全文
posted @ 2021-05-27 16:49 码农阿亮 阅读(57) 评论(0) 推荐(0) 编辑
摘要: C#等待异步操作执行完的方式 代码实现: namespace AsyncCallbackDemo1 { class Program { static void Main(string[] args) { //<参数,返回值> Func<int, int> mySum1 = SumNumbers; F 阅读全文
posted @ 2021-05-27 16:40 码农阿亮 阅读(1382) 评论(0) 推荐(0) 编辑
摘要: C#无损压缩图片 using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Drawing.Im 阅读全文
posted @ 2021-05-27 15:42 码农阿亮 阅读(188) 评论(0) 推荐(0) 编辑
摘要: Log4.net Helper工具类 一、Config文件配置 <?xml version="1.0" encoding="utf-8" ?> <configuration> <configSections> <section name="log4net" type="log4net.Config. 阅读全文
posted @ 2021-05-27 15:18 码农阿亮 阅读(790) 评论(0) 推荐(1) 编辑
摘要: C#使用Log4.net记录日子文件 一、简介 1.1 Log4.net优点 几乎所有的大型应用都会有自己的用于跟踪调试的API。因为一旦程序被部署以后,就不太可能再利用专门的调试工具了。然而一个管理员可能需要有一套强大的日志系统来诊断和修复配置上的问题。经验表明,日志记录往往是软件开发周期中的重要 阅读全文
posted @ 2021-05-27 11:35 码农阿亮 阅读(670) 评论(1) 推荐(2) 编辑