摘要: 在用visual studio做网站时不知道按了什么快捷键,所有页面上的空格都变成了点号,就像下图那样。 要解决空格变点号的方法有两种:1、编辑->高级->查看空白2、Ctrl+E 然后按S3、Ctrl+R+W 阅读全文
posted @ 2024-03-13 14:18 willamyao 阅读(41) 评论(0) 推荐(0) 编辑
摘要: using Newtonsoft.Json; using System; using System.Collections.Generic; using System.ComponentModel; using System.Diagnostics; using System.Linq; using 阅读全文
posted @ 2024-01-04 16:48 willamyao 阅读(20) 评论(0) 推荐(0) 编辑
摘要: a.. 等效于 a..^0 ..b 等效于 0..b .. 等效于 0..^0 范围运算符表达式说明 .. 集合中的所有值。 ..end 从开头到 end(不含)的值。 start.. 从 start(含)到结尾的值。 start..end 从 start(含)到 end(不含)的值。 ^start 阅读全文
posted @ 2023-12-29 10:51 willamyao 阅读(50) 评论(0) 推荐(0) 编辑
摘要: protected override CreateParams CreateParams { get { const int WS_EX_APPWINDOW = 0x40000; const int WS_EX_TOOLWINDOW = 0x80; CreateParams cp = base.Cr 阅读全文
posted @ 2023-08-22 17:06 willamyao 阅读(42) 评论(0) 推荐(0) 编辑
摘要: public class ArcGauge : Control { public ArcGauge() { Width = 200; Height = 200; SetCurrentValue(ValueProperty, 0d); SetCurrentValue(MinValueProperty, 阅读全文
posted @ 2023-06-06 17:38 willamyao 阅读(621) 评论(0) 推荐(1) 编辑
摘要: public class ButtonEx : Button { static ButtonEx() { DefaultStyleKeyProperty.OverrideMetadata(typeof(ButtonEx), new FrameworkPropertyMetadata(typeof(B 阅读全文
posted @ 2023-06-06 17:36 willamyao 阅读(17) 评论(0) 推荐(0) 编辑
摘要: private void MainForm_Load(object sender, EventArgs e) { this.dataGridView1.Columns.Add("JanWin", "Win"); this.dataGridView1.Columns.Add("JanLoss", "L 阅读全文
posted @ 2023-05-31 13:43 willamyao 阅读(11) 评论(0) 推荐(0) 编辑
摘要: 提到 MemoryStream 大家可能都不陌生,在编写代码中或多或少有使用过;比如Json序列化反序列化、导出PDF/Excel/Word、进行图片或者文字处理等场景。但是如果使用它高频、大数据量处理这些数据,就存在一些性能陷阱。 今天给大家带来的这个优化技巧其实就是池化 MemoryStream 阅读全文
posted @ 2023-01-03 10:39 willamyao 阅读(70) 评论(0) 推荐(0) 编辑
摘要: Type[] types = AppDomain.CurrentDomain.GetAssemblies() .SelectMany(a => a.GetTypes().Where(t => t.GetInterfaces().Contains(typeof(IConfigConvert)))) . 阅读全文
posted @ 2022-12-07 13:28 willamyao 阅读(36) 评论(0) 推荐(0) 编辑
摘要: 在.net core 中,utf8编码转GBK编码会报错,.netcore 无法实现编码的转换 解决方法 1、Nuget中搜索安装 System.Text.Encoding.CodePages 2、 在startup 中 做如下设置 public Startup(IConfiguration con 阅读全文
posted @ 2022-12-05 10:18 willamyao 阅读(395) 评论(0) 推荐(0) 编辑