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