摘要:
这里举例两种方式。 1. Newtonsoft.Json.JsonConvert 需要引用外部的 Newtonsoft.Json.dll /// <summary> /// 将json字符串转换为对象(使用Json.net) /// </summary> /// <param name="respo 阅读全文
posted @ 2021-03-03 19:25
鑫茂
阅读(421)
评论(0)
推荐(0)
摘要:
1. 程序根目录: (D:\\...\\WpfApp1\\WpfApp1\\bin\\Debug") string exePath = Environment.CurrentDirectory; 2. 获取该进程的命令行 (\"D:\\...\\WpfApp1\\WpfApp1\\bin\\Debu 阅读全文
posted @ 2021-03-03 19:21
鑫茂
阅读(573)
评论(0)
推荐(0)
摘要:
1. 若需要控制 exe 实例数量 bool ret; mutex = new System.Threading.Mutex(true, exename, out ret); if (!ret) { //"系统已经启动" Environment.Exit(0); } 2. 退出时 public Ap 阅读全文
posted @ 2021-03-03 18:43
鑫茂
阅读(1084)
评论(0)
推荐(2)

浙公网安备 33010602011771号