随笔分类 - C#知识点
摘要:SELECT CONCAT( '/// <summary>\r\n/// ', COLUMN_COMMENT, '\r\n/// </summary>\r\npublic ', CASE DATA_TYPE WHEN 'bigint' THEN 'int' WHEN 'tinyint' THEN '
阅读全文
摘要:using System;using System.Net.Http;using System.Threading.Tasks; class Program{ static async Task Main(string[] args) { // 创建 HttpClient 实例 using (Htt
阅读全文
摘要:WebClient 参考:https://blog.csdn.net/qq_34739157/article/details/125373179 HttpClient 参考(WebClient已经过时了):https://blog.csdn.net/qq_33033813/article/detai
阅读全文
摘要:装载自:https://www.cnblogs.com/noobprogrammer/p/15745382.html SELECT CONCAT( '/// <summary>\r\n/// ', COLUMN_COMMENT, '\r\n/// </summary>\r\npublic ', CA
阅读全文
摘要:原数组: int[] a = new int[5] { 1, 3, 5, 4, 2 }; 取前三位: int[] b = new int[3]; //新数组 Array.ConstrainedCopy(a, 1, b, 0, 3); // 1:a数组从第1位开始截取;0:b数组从0位开始插入;3:a
阅读全文
摘要:参考文档:https://blog.csdn.net/xinjitmzy/article/details/100516336 导出方法: 代码: private void skinButton2_Click(object sender, EventArgs e){ try { sc.isAll =
阅读全文
摘要:MD5加密方法: public static string calculateDigest(string content, string secretkey) { string toSignContent = content + secretkey; MD5 md5 = MD5.Create();
阅读全文
摘要:#region CMD直接运行语句,不适用所有服务器bool result = false;try{ using (Process process = new Process())创建进程对象 { string strInput = Console.ReadLine(); Process p = n
阅读全文
摘要:List<int> listA = new List<int> {1,2,3,5,7,9}; List<int> listB = new List<int> {13,4,17,29,2}; List<int> Result = listA.Union(listB).ToList<int>(); //
阅读全文
摘要:创建委托 1: //定时器,执行委托线程事件 private static System.Timers.Timer GetCrossTimer; //自定义委托 private delegate void ListenServerDelegate(string text); private List
阅读全文
摘要:Demo: public void DataGirdViewCellPaste() { try { // 获取剪切板的内容,并按行分割 string pasteText = ""; pasteText = Clipboard.GetText(); if (string.IsNullOrEmpty(p
阅读全文