随笔分类 - C#
摘要:Random rand = new Random(); int i= rand.Next(1000, 3000); // 生成1000(包括)到3000(不包括)之间的随机数
阅读全文
摘要:可以先删了packages.config 然后在程序包管理控制台执行,下载最新的 Install-Package Microsoft.AspNet.WebApi.WebHost
阅读全文
摘要:引用的 log4net.config 文件设置成【如果较新则复制】
阅读全文
摘要:string sendUrl = $"http://10.172.1.20/wtoptst/ws/r/awsp920"; HttpClient sendclient = new HttpClient(); string testStr = JsonConvert.SerializeObject(re
阅读全文
摘要:Dim date2Entered As String = InputBox("Enter a date") Try Dim date2 As Date = Date.Parse(date2Entered) Dim date1 As Date = Now ' Determine the number
阅读全文
摘要://拼接信息 StringBuilder sb = new StringBuilder(); sb.Append("条码:00002"); sb.AppendLine(); sb.Append("条码:00003"); sb.ToString();
阅读全文
摘要:GregorianCalendar gc = new GregorianCalendar(); DateTime datetime = DateTime.Now; int week = gc.GetWeekOfYear(datetime, CalendarWeekRule.FirstFullWeek
阅读全文
摘要:string[] arr = dataTable.AsEnumerable() .Select(row => row.Field<string>("tgNo")).ToArray();
阅读全文
摘要:修改一下属性就行 this.txtTime.Properties.DisplayFormat.FormatString = "yyyy-MM-dd"; this.txtTime.Properties.DisplayFormat.FormatType = DevExpress.Utils.Format
阅读全文
摘要:1、微信公众号网页开发授权文档 2、主要测试代码 前端界面代码 <form method="POST" id="submitForm"> <label for="name">工号</label> <input type="text" class="form-control" name="userNa
阅读全文
摘要:1、微信公众号文档 微信公众号模板消息发送文档 2、测试代码 /// <summary> /// 测试公众号发送推送消息 /// </summary> public async Task<bool> SendMessage() { //公众号的appid|secret var appid = "填写
阅读全文
摘要:开启嵌套即可
阅读全文
摘要:using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Net; using System.Text; using System.Windows.Forms; n
阅读全文
摘要:[C# 网络编程系列]专题十二:实现一个简单的FTP服务器 - Learning hard - 博客园 (cnblogs.com)
阅读全文
摘要:如何复制、删除和移动文件和文件夹 - C# 编程指南 | Microsoft Docs
阅读全文
摘要:1. 找到XXX.Application项目,右键–》属性–》生成,如下图: 勾选上XML文档文件,并记住XML文件名称。 2. 修改XXX.web项目里面的StartUp.cs脚本在StartUp.cs中,找到方法ConfigureSwaggerServices(),在services.AddSw
阅读全文
摘要:问题:页面处于loading....状态或500内部服务器错误 安装重写URL模块: https://www.iis.net/downloads/microsoft/url-rewrite#additionalDownloads 微软BalzorIIS部署: https://docs.microso
阅读全文
摘要:生产环境常用的记录: dotnet goods.HttpApi.Host.dll --urls="http://10.168.5.147:44331"
阅读全文
摘要:string path = @"\\192.168.28.217\新建文件夹"; System.Diagnostics.Process.Start("explorer.exe", path); 例子 链接:https://pan.baidu.com/s/1totpwoEPJG8gfpKHpTO1Cw
阅读全文