随笔分类 -  C#

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