随笔分类 -  C#

上一页 1 2 3 4 5 6 ··· 12 下一页
摘要:https://www.cnblogs.com/li150dan/p/13492280.html //对字符进行UrlEncode编码 string text= System.Web.HttpUtility.UrlEncode("heart", System.Text.Encoding.UTF8); 阅读全文
posted @ 2023-03-22 11:40 LuoCore 阅读(3708) 评论(0) 推荐(0) 编辑
摘要:https://blog.csdn.net/weixin_42953003/article/details/119676004 using System; using System.Collections.Generic; using System.Linq; using System.Text; 阅读全文
posted @ 2023-02-14 09:57 LuoCore 阅读(133) 评论(0) 推荐(0) 编辑
摘要:/// <summary> /// 把对象null转换{}为JSON字符串 /// </summary> /// <param name="o">对象</param> /// <returns>JSON字符串</returns> public static string ObjectToJsonNu 阅读全文
posted @ 2023-02-08 19:48 LuoCore 阅读(752) 评论(0) 推荐(0) 编辑
摘要:【C#】字符串提取(获取两个字符串中间的字符串) https://blog.csdn.net/weixin_43553508/article/details/102673668 C#三行代码实现提取两个字符之间的字符串 https://blog.csdn.net/qq_25760257/articl 阅读全文
posted @ 2023-02-03 14:34 LuoCore 阅读(155) 评论(0) 推荐(0) 编辑
摘要:https://www.cnblogs.com/xdot/p/6632313.html#:~:text=%E5%9C%A8C%23%E6%99%BA%E8%83%BD%E6%B3%A8%E9%87%8A%E6%97%B6%EF%BC%8C%E5%B8%B8%E5%B8%B8%E5%B8%8C%E6% 阅读全文
posted @ 2023-01-06 09:28 LuoCore 阅读(1382) 评论(0) 推荐(0) 编辑
摘要:参考文档 DataGridView绑定BindingList<T>带数据排序的类 - 腾讯云开发者社区-腾讯云 (tencent.com) DataGridView使用技巧十三:点击列头实现升序和降序排序 - .NET开发菜鸟 - 博客园 (cnblogs.com) 必须设置 自动排序 column 阅读全文
posted @ 2022-11-28 20:53 LuoCore 阅读(37) 评论(0) 推荐(0) 编辑
摘要:参考地址:https://www.cnblogs.com/ckka/p/11368572.html /// <summary> /// 信息 /// </summary> public class DataInfo { public long Id { get; set; } public stri 阅读全文
posted @ 2022-11-18 10:18 LuoCore 阅读(20) 评论(0) 推荐(0) 编辑
摘要:https://blog.csdn.net/lilinoscar/article/details/75529821 例如14位日期:20170417101215 转换DateTime格式: var time="20170417101215"; var dateTime = DateTime.Pars 阅读全文
posted @ 2022-10-10 16:21 LuoCore 阅读(889) 评论(0) 推荐(0) 编辑
摘要:https://www.skyfinder.cc/2021/12/17/net-core-register-encoding/#:~:text=%E5%9C%A8%E4%BD%BF%E7%94%A8.net%205%20%E6%9E%84%E5%BB%BA%E5%BA%94%E7%94%A8%E6% 阅读全文
posted @ 2022-10-10 15:51 LuoCore 阅读(649) 评论(0) 推荐(0) 编辑
摘要:https://blog.csdn.net/CSDN2016DDDD/article/details/80226755 上移:DataRow newdata = dt.NewRow();newdata.ItemArray = dt.Rows[ii].ItemArray;dt.Rows.RemoveA 阅读全文
posted @ 2022-09-16 15:44 LuoCore 阅读(416) 评论(0) 推荐(0) 编辑
摘要:/// <summary> /// 将 Stream 写入文件 /// </summary> public static void StreamToFile(Stream stream, string fileName) { // 把 Stream 转换成 byte[] byte[] bytes = 阅读全文
posted @ 2022-09-13 17:08 LuoCore 阅读(1843) 评论(0) 推荐(0) 编辑
摘要:OpenFileDialog控件,而使用该控件时若没有将条件设置好,很容易出现以下提示: 打开一个文件后,尝试重新打开一次该文件,或者打开该文件后想对该文件进行其他操作的时候,就容易出现这个错误提示,错误的原因很简单,解决方法也很简单。 System.IO.FileStream时参数设置有问题。 F 阅读全文
posted @ 2022-08-03 09:53 LuoCore 阅读(2135) 评论(0) 推荐(0) 编辑
摘要:原文地址:https://cloud.tencent.com/developer/article/1530659 在C#里关于定时器类就有三个 1、System.Windows.Forms.Timer 2、System.Threading.Timer 3、定义在System.Timers.Timer 阅读全文
posted @ 2022-07-25 18:38 LuoCore 阅读(3377) 评论(0) 推荐(0) 编辑
摘要:参考来源: https://www.jb51.net/article/32645.htm https://www.cnblogs.com/appskyy/p/11019647.html (主要就是这个DOS CMD 调用DOS) public class SystemServicesMSCHelpe 阅读全文
posted @ 2022-07-01 13:41 LuoCore 阅读(1098) 评论(0) 推荐(0) 编辑
摘要:在不是web 项目中也不是Api 中使用 HttpClientFactory 先需要添加 Microsoft.Extensions.DependencyInjection.Abstractions Microsoft.Extensions.Http static readonly IServiceC 阅读全文
posted @ 2022-06-23 15:49 LuoCore 阅读(44) 评论(0) 推荐(0) 编辑
摘要:来源:https://www.cnblogs.com/endv/p/4199619.html Color.AliceBlue 240,248,255 Color.LightSalmon 255,160,122 Color.AntiqueWhite 250,235,215 Color.LightSea 阅读全文
posted @ 2022-06-22 10:06 LuoCore 阅读(890) 评论(0) 推荐(0) 编辑
摘要:https://blog.csdn.net/yueguangzhiyuan/article/details/8926131 一般而言,非公共成员是受保护的,不能被外部访问的,这些都是基于安全性考虑。可是有时,我们很想取到非公共成员的某个对象。那我们就得用到两个方法:GetType().GetFiel 阅读全文
posted @ 2022-06-21 10:19 LuoCore 阅读(331) 评论(0) 推荐(0) 编辑
摘要:public static string PostFromQueryToString(string url, string reqData) { string strUrl = new UriBuilder(url) { Query = reqData }.ToString(); if (strUr 阅读全文
posted @ 2022-06-18 12:12 LuoCore 阅读(2055) 评论(0) 推荐(0) 编辑
摘要:https://blog.csdn.net/u012143455/article/details/70157233 //字符串数组(源数组) string[] sNums = new[] {"1", "2"}; //整型数组(目标数组) int[] iNums; //转换方法 iNums = Arr 阅读全文
posted @ 2022-05-30 17:26 LuoCore 阅读(1570) 评论(0) 推荐(0) 编辑
摘要:https://blog.csdn.net/zhang0000dehai/article/details/80701341 using System.Text.RegularExpressions; var majorname = "考古学(清华大学)".Replace("(", "(").Repl 阅读全文
posted @ 2022-05-13 17:36 LuoCore 阅读(1119) 评论(0) 推荐(0) 编辑

上一页 1 2 3 4 5 6 ··· 12 下一页
点击右上角即可分享
微信分享提示