摘要: 作为一名非主修C#的程序员,在此记录下学习与工作中C#的有用内容,持续更新 对类型进行约束,class指定了类型必须是引用类型,new()指定了类型必须具有一个无参的构造函数,规定T类型必须实现IUser,规定T必须为struct where T : class, new(), T:IUser, T 阅读全文
posted @ 2017-04-22 19:45 Hey,Coder! 阅读(504) 评论(0) 推荐(0) 编辑
摘要: 下载微软工具 - Streams https://learn.microsoft.com/en-us/sysinternals/downloads/ streams -s -d D:/file 阅读全文
posted @ 2024-11-20 16:39 Hey,Coder! 阅读(1) 评论(0) 推荐(0) 编辑
摘要: <hc:NotifyIcon Text="xxxx程序" Visibility="Collapsed" Name="notifyIcon" Icon="/Assets/Ico/title.ico" Click="NotifyIcon_Click" MouseRightButtonDown="noti 阅读全文
posted @ 2024-11-15 17:50 Hey,Coder! 阅读(2) 评论(0) 推荐(0) 编辑
摘要: Roslyn 安装Microsoft.CodeAnalysis.CSharp.Scripting using Microsoft.CodeAnalysis.CSharp.Scripting; using Microsoft.CodeAnalysis.Scripting; string code = 阅读全文
posted @ 2024-11-15 13:11 Hey,Coder! 阅读(1) 评论(0) 推荐(0) 编辑
摘要: 屏蔽ssl验证即可 Browser.RequestHandler = new ExampleRequestHandler(); public class ExampleRequestHandler : RequestHandler { protected override bool OnCertif 阅读全文
posted @ 2024-11-14 22:43 Hey,Coder! 阅读(7) 评论(0) 推荐(0) 编辑
摘要: 注意参数是否存在null值 var json = JsonConvert.SerializeObject(dto); var dic = JsonConvert.DeserializeObject<Dictionary<string, object>>(json); foreach (var ite 阅读全文
posted @ 2024-11-14 10:59 Hey,Coder! 阅读(8) 评论(0) 推荐(0) 编辑
摘要: 引入需要的接口 /// <summary> /// 查找窗口 /// </summary> /// <param name="hwnd">窗口句柄</param> /// <param name="title">窗口标题</param> /// <returns></returns> [DllImp 阅读全文
posted @ 2024-11-13 23:38 Hey,Coder! 阅读(0) 评论(0) 推荐(0) 编辑
摘要: using Microsoft.Win32; using System; using System.Reflection; namespace Boaway.Platform.DataCollection.Client.Helper { public static class AutoStartHe 阅读全文
posted @ 2024-11-13 16:18 Hey,Coder! 阅读(8) 评论(0) 推荐(0) 编辑
摘要: public static class ShortCutHelper { public static string linkTilte = Assembly.GetExecutingAssembly().GetName().Name; public static string lnkFullPath 阅读全文
posted @ 2024-11-13 16:07 Hey,Coder! 阅读(1) 评论(0) 推荐(0) 编辑
摘要: private static void InjectResourcePath(WebApplication app, string path, string requestPath) { var provider = new FileExtensionContentTypeProvider(); p 阅读全文
posted @ 2024-11-11 18:34 Hey,Coder! 阅读(2) 评论(0) 推荐(0) 编辑
摘要: public class MessageEx { /// <summary> /// 定义数据暂存 /// </summary> private static readonly Dictionary<string, List<Action<object>>> _handlers = new(); / 阅读全文
posted @ 2024-11-05 13:59 Hey,Coder! 阅读(6) 评论(0) 推荐(0) 编辑