随笔分类 - c#
摘要:1、nssm工具 下载地址 http://www.nssm.cc/download 2、命令 http://www.nssm.cc/commands nssm install <servicename> nssm install <servicename> <program> nssm instal
阅读全文
摘要:1、代码 // See https://aka.ms/new-console-template for more information using Newtonsoft.Json; using Newtonsoft.Json.Linq; using System; namespace Applic
阅读全文
摘要:class UpdateVideoTokenHelper { private static Timer myTimer; private static string appKey = ConfigurationManager.AppSettings["appKey"]; private static
阅读全文
摘要:1、代码 using System; using System.Collections.Generic; namespace ToolClass { class Program { static void Main(string[] args) { List<Point> polygonData =
阅读全文
摘要:1、代码 using System; using System.Collections.Generic; using System.IO; using Word = Microsoft.Office.Interop.Word;//nuget 直接搜 namespace ConsoleApp3 { c
阅读全文
摘要:1、数据结构 public class Data { public string ID { get; set; } public string Name { get; set; } public string ParentId { get; set; } public List<Data> Chil
阅读全文
摘要:1、去掉Winform 窗体的最大化和最小化 这个两个属性设置为false 2、窗体关闭 事件,添加如下代码 private void frmToolsConsole_FormClosing(object sender, FormClosingEventArgs e) { //窗体关闭原因为单击"关
阅读全文
摘要:1、配置跨域 1)、首先注册跨域要求 ,(可访问的IP、端口) //注册跨域 services.AddCors(options => { options.AddPolicy("XiaoQiAllowOrigins", builder => { builder.WithOrigins("http://
阅读全文
摘要:1、EF Core 使用的补充 1) 创建 接口 IEFCoreService 2) 实现 接口 EFCoreService 3) 在Startup.cs 中注册 ef 服务 并在控制器中注入使用 (这种方式不规范,只是对其基本使用的一些操作) 注册服务代码 services.AddScoped<I
阅读全文
摘要:1、项目地址 https://github.com/xiaoqiyaozou1/XiaoQi.Study 2、项目创建 vs 2019 创建 asp.net core api 项目 3、EF Core 的基本使用 1、创建类库 2、引入下图相关包 3、创建Model 类 可以分开创建,我为了方便放到
阅读全文