随笔分类 -  c#

上一页 1 2 3 4 5 6 ··· 11 下一页
摘要:DateTime? startTime startTime = Convert.ToDateTime(new DateTime(startTime.Value.Year, startTime.Value.Month, 1).ToString("yyyy-MM-dd")); //获取当月第一天 var 阅读全文
posted @ 2020-12-31 11:59 enych 阅读(850) 评论(0) 推荐(0)
摘要:Thread.Sleep(int.Parse(this.textBox1.Text.Trim()) * 60 * 1000);//1000毫秒是1s,1分钟60s;1x60x1000 MessageBox.Show("事件到了!"); 1. 使用 定时器 2. 使用 延时 阅读全文
posted @ 2020-12-29 17:01 enych 阅读(96) 评论(0) 推荐(0)
摘要:var d1 = Convert.ToDateTime(list[0].BeginTime); var d2 = Convert.ToDateTime(list[0].EndTime); var difference = Time2TimeStamp(d2) - Time2TimeStamp(d1) 阅读全文
posted @ 2020-11-21 15:57 enych 阅读(360) 评论(0) 推荐(0)
摘要:encodeURIComponent('\n') "%0A" encodeURIComponent('\\') "%5C" encodeURIComponent('/') "%2F" encodeURIComponent(',') "%2C" encodeURIComponent('\'') %27 阅读全文
posted @ 2020-09-03 17:43 enych 阅读(1006) 评论(0) 推荐(0)
摘要:ICollection<string> keys = Request.Form.Keys; foreach (string key in Request.Form.Keys) { } var key_list = Request.Form.Keys.ToList(); for (int i = 0; 阅读全文
posted @ 2020-08-27 17:57 enych 阅读(976) 评论(0) 推荐(0)
摘要:using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc.Filters; namespace Manage.Api { /// <summary> /// 若Action返回对象为自定义对象,则将其转为JSON /// </sum 阅读全文
posted @ 2020-08-14 17:29 enych 阅读(653) 评论(0) 推荐(0)
摘要:参考1: https://www.qqxiuzi.cn/bianma/Unicode-UTF.php参考2: https://www.cnblogs.com/xinruzhishui/p/6259146.html本工具可以把中文、英文字母、标点符号、特殊特号等字符串转换成以反斜杠u(\u)开头的16 阅读全文
posted @ 2020-05-11 16:20 enych 阅读(424) 评论(0) 推荐(0)
摘要:// 启用倒带功能,就可以让 Request.Body 可以再次读取 Request.EnableBuffering(); //((Microsoft.AspNetCore.Http.DefaultHttpRequest)Request).ContentLength ASP.NET Core 中 H 阅读全文
posted @ 2020-04-17 09:25 enych 阅读(463) 评论(0) 推荐(0)
摘要://声明接受int的方法并返回空的委托。 public delegate void invokeDelegate(); //调用委托, // invokeDelegate FF = new invokeDelegate(StartMethod); private void button1_Click 阅读全文
posted @ 2020-03-27 17:44 enych 阅读(300) 评论(0) 推荐(0)
摘要:C#服务器接受 string url = request["url"]; publicasync Task<AjaxResult<List<T_Sys_Suggestion>>> GetDataListByTime(Pagination pagination, string condition, s 阅读全文
posted @ 2020-03-23 15:42 enych 阅读(353) 评论(0) 推荐(0)
摘要:https://www.cnblogs.com/fancunwei/p/9567497.html 阅读全文
posted @ 2020-03-23 15:28 enych 阅读(187) 评论(0) 推荐(0)
摘要:private void AlarmDemo_FormClosing(object sender, FormClosingEventArgs e) { ////MessageBox.Show("你按下了ESC"); DialogResult dr = MessageBox.Show("确定要退出吗? 阅读全文
posted @ 2020-03-17 09:09 enych 阅读(821) 评论(0) 推荐(0)
摘要:byte[] bUserInfoSearch = new byte[1024 * 10]; //10kb大小 Marshal.Copy(lpBuffer, bUserInfoSearch, 0, bUserInfoSearch.Length); string strUserInfoSearch = 阅读全文
posted @ 2020-03-13 11:37 enych 阅读(1353) 评论(0) 推荐(0)
摘要://托管内存中的数据 复制到非托管内存中 IntPtr ptrURL = Marshal.StringToHGlobalAnsi("123465"); //释放在非托管中分配的内存 Marshal.FreeHGlobal(ptrURL); NET_DVR_StartRemoteConfig(0,0, 阅读全文
posted @ 2020-03-10 14:11 enych 阅读(829) 评论(0) 推荐(0)
摘要://定义一个委托 public delegate void RemoteConfigCallback(uint dwType, IntPtr lpBuffer, uint dwBufLen, IntPtr pUserData); //定义一个函数 private void ProcessUserIn 阅读全文
posted @ 2020-03-10 11:56 enych 阅读(408) 评论(0) 推荐(0)
摘要:public class test { //属性 public unicode_gb[] m_unicode_gb = new unicode_gb[10]; public A[] m_A = new A[10]; public class A { public int unicode; publi 阅读全文
posted @ 2020-03-09 17:24 enych 阅读(1402) 评论(0) 推荐(0)
摘要:Dictionary<string, int> list = new Dictionary<string, int>(); list.Add("d", 1); //3.0以上版本 foreach (var item in list) { Console.WriteLine(item.Key + it 阅读全文
posted @ 2020-01-25 21:22 enych 阅读(242) 评论(0) 推荐(0)
摘要:using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System. 阅读全文
posted @ 2020-01-19 20:53 enych 阅读(470) 评论(0) 推荐(0)
摘要:private void timer1_Tick(object sender, EventArgs e) { if (GetAsyncKeyState(0x01) > 0) { keydown(); } //按下的时候开启 /* 开启时钟 */ //松开的时候关闭 /* 关闭时钟 */ } [Dll 阅读全文
posted @ 2020-01-19 16:29 enych 阅读(570) 评论(0) 推荐(0)
摘要:#region --设置指定窗口名称为隐藏 // 获取查找窗体句柄(通过窗体标题名) //通过句柄设置当前窗体最大化(0:隐藏窗体,1:默认窗体,2:最小化窗体,3:最大化窗体,....) IntPtr mainHandle = FindWindow(null, "屏幕键盘"); bool resu 阅读全文
posted @ 2020-01-15 15:55 enych 阅读(1203) 评论(0) 推荐(0)

上一页 1 2 3 4 5 6 ··· 11 下一页